nixpkgs/pkgs/development/python-modules/pyscard/ignore-macos-bug.patch
Andrew Childs 59e9e56f92 pyscard: fix darwin build, remove pcsc library mixing
This should be built against a single version of PCSC: either the one
from pcsclite, or the one from Apple's PCSC framework.
2019-07-20 21:40:30 +09:00

23 lines
833 B
Diff

diff --git a/test/test_SCardGetErrorMessage.py b/test/test_SCardGetErrorMessage.py
old mode 100644
new mode 100755
index c6fe755..c1217f5
--- a/test/test_SCardGetErrorMessage.py
+++ b/test/test_SCardGetErrorMessage.py
@@ -29,12 +29,10 @@ class TestError(unittest.TestCase):
self.assertEqual(res, expected)
res = SCardGetErrorMessage(1)
+ expected = "Unknown error: 0x00000001"
# macOS bug not yet fixed
- if get_platform().startswith('macosx-') and get_platform() < 'macosx-10.13':
- expected = "Unkown error: 0x00000001"
- else:
- expected = "Unknown error: 0x00000001"
- self.assertEqual(res, expected)
+ macos_bug_expected = "Unkown error: 0x00000001"
+ self.assertIn(res, [expected, macos_bug_expected])
if __name__ == '__main__':