1From c596ad546fe7460b57a62799837757eb641309c1 Mon Sep 17 00:00:00 2001
2From: Sirio Balmelli <sirio@b-ad.ch>
3Date: Mon, 20 Jul 2020 19:51:20 +0200
4Subject: [PATCH] Disable tests that fail on Darwin (macOS) or with sandboxing
5
6Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
7---
8 test.py | 4 ++++
9 1 file changed, 4 insertions(+)
10
11diff --git a/test.py b/test.py
12index f8029c0..ba1d141 100644
13--- a/test.py
14+++ b/test.py
15@@ -404,6 +404,7 @@ exit(3)
16 self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(),
17 "one two three")
18
19+ @not_macos
20 def test_ok_code(self):
21 from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
22
23@@ -1004,6 +1005,7 @@ print(sys.argv[1])
24 now = time.time()
25 self.assertGreater(now - start, sleep_time)
26
27+ @not_macos
28 def test_background_exception(self):
29 from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
30 p = ls("/ofawjeofj", _bg=True, _bg_exc=False) # should not raise
31@@ -1801,6 +1803,7 @@ exit(49)
32 p = python(py.name, _ok_code=49, _bg=True)
33 self.assertEqual(49, p.exit_code)
34
35+ @not_macos
36 def test_cwd(self):
37 from sh import pwd
38 from os.path import realpath
39@@ -2899,6 +2902,7 @@ print("hi")
40 python(py.name, _in=stdin)
41
42 @requires_utf8
43+ @skipUnless(False, "Does not work in sandbox")
44 def test_unicode_path(self):
45 from sh import Command
46
47--
482.27.0
49