Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

pythonPackages.sh: disable failing tests on Darwin

+53
+4
pkgs/development/python-modules/sh/default.nix
··· 9 sha256 = "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"; 10 }; 11 12 postPatch = '' 13 sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py 14 '';
··· 9 sha256 = "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"; 10 }; 11 12 + # Disable tests that fail on Darwin 13 + # Some of the failures are due to Nix using GNU coreutils 14 + patches = [ ./disable-broken-tests-darwin.patch ]; 15 + 16 postPatch = '' 17 sed -i 's#/usr/bin/env python#${python.interpreter}#' test.py 18 '';
+49
pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch
···
··· 1 + From 264f2f6a04d25156bba43524a6b172d2e99c53f4 Mon Sep 17 00:00:00 2001 2 + From: Ben Wolsieffer <benwolsieffer@gmail.com> 3 + Date: Fri, 21 Dec 2018 17:39:45 -0500 4 + Subject: [PATCH] Disable tests that fail on OSX. 5 + 6 + Some of the failures are due to the use of GNU ls. 7 + --- 8 + test.py | 4 ++++ 9 + 1 file changed, 4 insertions(+) 10 + 11 + diff --git a/test.py b/test.py 12 + index 68ef40c..2f53360 100644 13 + --- a/test.py 14 + +++ b/test.py 15 + @@ -352,6 +352,7 @@ exit(3) 16 + self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(), 17 + "one two three") 18 + 19 + + @not_osx 20 + def test_ok_code(self): 21 + from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 22 + 23 + @@ -498,6 +499,7 @@ while True: 24 + self.assertEqual(out, match) 25 + 26 + 27 + + @not_osx 28 + def test_environment(self): 29 + """ tests that environments variables that we pass into sh commands 30 + exist in the environment, and on the sh module """ 31 + @@ -861,6 +863,7 @@ print(sys.argv[1]) 32 + self.assertTrue(now - start > sleep_time) 33 + 34 + 35 + + @not_osx 36 + def test_background_exception(self): 37 + from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2 38 + p = ls("/ofawjeofj", _bg=True) # should not raise 39 + @@ -2036,6 +2039,7 @@ else: 40 + self.assertEqual(p, "test") 41 + 42 + 43 + + @not_osx 44 + def test_signal_exception(self): 45 + from sh import SignalException_15 46 + 47 + -- 48 + 2.20.0 49 +