aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/development/python-modules/sh/disable-broken-tests-darwin.patch
blob: c51490ce6a40f6318eed917771c1ca0423ec7e17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From c596ad546fe7460b57a62799837757eb641309c1 Mon Sep 17 00:00:00 2001
From: Sirio Balmelli <sirio@b-ad.ch>
Date: Mon, 20 Jul 2020 19:51:20 +0200
Subject: [PATCH] Disable tests that fail on Darwin (macOS) or with sandboxing

Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
---
 test.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test.py b/test.py
index f8029c0..ba1d141 100644
--- a/test.py
+++ b/test.py
@@ -404,6 +404,7 @@ exit(3)
         self.assertEqual(sed(_in="one test three", e="s/test/two/").strip(),
                          "one two three")
 
+    @not_macos
     def test_ok_code(self):
         from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
 
@@ -1004,6 +1005,7 @@ print(sys.argv[1])
         now = time.time()
         self.assertGreater(now - start, sleep_time)
 
+    @not_macos
     def test_background_exception(self):
         from sh import ls, ErrorReturnCode_1, ErrorReturnCode_2
         p = ls("/ofawjeofj", _bg=True, _bg_exc=False)  # should not raise
@@ -1801,6 +1803,7 @@ exit(49)
         p = python(py.name, _ok_code=49, _bg=True)
         self.assertEqual(49, p.exit_code)
 
+    @not_macos
     def test_cwd(self):
         from sh import pwd
         from os.path import realpath
@@ -2899,6 +2902,7 @@ print("hi")
         python(py.name, _in=stdin)
 
     @requires_utf8
+    @skipUnless(False, "Does not work in sandbox")
     def test_unicode_path(self):
         from sh import Command
 
-- 
2.27.0