depot/third_party/nixpkgs/pkgs/development/python-modules/pyscard/ignore-macos-bug.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

22 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__':