at 22.05-pre 1.6 kB view raw
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--- a/test.py 8+++ b/test.py 9@@ -377,6 +377,7 @@ exit(3) 10 self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(), 11 "one two three") 12 13+ @not_macos 14 def test_ok_code(self): 15 from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 16 17@@ -982,6 +983,7 @@ print(sys.argv[1]) 18 now = time.time() 19 self.assertGreater(now - start, sleep_time) 20 21+ @not_macos 22 def test_background_exception(self): 23 from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 24 p = ls("/ofawjeofj", _bg=True, _bg_exc=False) # should not raise 25@@ -1779,6 +1781,7 @@ exit(49) 26 p = python(py.name, _ok_code=49, _bg=True) 27 self.assertEqual(49, p.exit_code) 28 29+ @not_macos 30 def test_cwd(self): 31 from sh import pwd 32 from os.path import realpath 33@@ -2777,6 +2780,7 @@ print("cool") 34 # on osx. so skip it for now if osx 35 @not_macos 36 @requires_progs("lsof") 37+ @skipUnless(False, "Flaky on Hydra") 38 def test_no_fd_leak(self): 39 import sh 40 import os 41@@ -2879,6 +2883,7 @@ print("hi") 42 python(py.name, _in=stdin) 43 44 @requires_utf8 45+ @skipUnless(False, "Does not work in sandbox") 46 def test_unicode_path(self): 47 from sh import Command 48