Skip to content

Commit

Permalink
Updates text to be tolerant of macOS typo.
Browse files Browse the repository at this point in the history
This change is necessary to build on modern Macs
with nix. See NixOS/nixpkgs#91716
  • Loading branch information
kevingriffin committed Jul 5, 2020
1 parent ab4e795 commit 4f58ac0
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/test_SCardGetErrorMessage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,8 @@ def test_SCardGetErrorMessage(self):
res = SCardGetErrorMessage(1)
expected = "Unknown error: 0x00000001"
# macOS bug not yet fixed
if get_platform().startswith('macosx-'):
version = get_platform() # something like 'macosx-10.14-x86_64'
version = version.split('-')[1] # '10.14'
major, minor = map(int, version.split('.')) # (10, 14)
if major == 10 and minor < 13:
expected = "Unkown error: 0x00000001"

self.assertEqual(res, expected)
macos_bug_expected = "Unkown error: 0x00000001"
self.assertIn(res, [expected, macos_bug_expected])


if __name__ == '__main__':
Expand Down

0 comments on commit 4f58ac0

Please sign in to comment.