LudovicRousseau / pyscard

pyscard smartcard library for python
http://pyscard.sourceforge.net/
GNU Lesser General Public License v2.1
396 stars 113 forks source link

1.9.8 failed test on x86_64-darwin #77

Closed worldofpeace closed 5 years ago

worldofpeace commented 5 years ago

Noticed in Nix

======================================================================
FAIL: test_SCardGetErrorMessage (test.test_SCardGetErrorMessage.TestError)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/private/tmp/nix-build-python3.7-pyscard-1.9.8.drv-0/pyscard-1.9.8/test/test_SCardGetErrorMessage.py", line 37, in test_SCardGetErrorMessage
    self.assertEqual(res, expected)
AssertionError: 'Unkown error: 0x00000001' != 'Unknown error: 0x00000001'
- Unkown error: 0x00000001
+ Unknown error: 0x00000001
?    +
worldofpeace commented 5 years ago

It looks like you've taken special measures here https://github.com/LudovicRousseau/pyscard/commit/89c52ba2aaa1975291ddc7c19b672187dc62599a

Our builders return macosx-10.6-x86_64 as our platform.

LudovicRousseau commented 5 years ago

The problem here is that 'macosx-10.6-x86_64' < 'macosx-10.13' returns False. So my test in the commit you mention is incorrect for macOS < 10.10 :-(

Can you double check the commit https://github.com/LudovicRousseau/pyscard-debug/commit/d319a141e9188f54b1478368363277be1501499a fixes the issue?

Thanks

worldofpeace commented 5 years ago

@LudovicRousseau With that commit as a patch tests on darwin pass with our CI https://github.com/NixOS/nixpkgs/pull/58830/checks?check_run_id=94351210 :sparkles:

LudovicRousseau commented 5 years ago

Fixed in https://github.com/LudovicRousseau/pyscard/commit/62e675028086c75656444cc21d563d9f08ebf8e7

Thanks