-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR introduces the following changes: - Migrate the test suite to use pytest features - Address a duplicated test name in test_Exceptions.py: test_ListReadersException. The duplicate tests have been merged. Most of this work was mechanical: - Remove unittest.TestCase subclass definition lines - De-dent the class methods - Remove references to self in the function parameters - Use regular expressions to search and replace assertions: - self.assertEqual(x, y) -> assert x == y - self.assertRaises -> pytest.raises - self.assertFalse(x) -> assert x is False - self.assertIn(x, y) -> assert x in y Some long strings were wrapped to prepare for the possibility of using code formatters in the future. STDOUT capture code was replaced with the pytest capsys fixture, which simplified the code in test_ATR.py. This PR prepares for the possibility of consolidating the live tests in src/smartcard/test/ together with the overall test suite, and using pytest features to control whether the live tests run or not. This is only a possibility, not a guarantee, but migrating from unittest code to pytest code helps pave the way.
- Loading branch information
1 parent
51c268a
commit 1e3c419
Showing
7 changed files
with
564 additions
and
528 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.