Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the following changes:
test_Exceptions.py
:test_ListReadersException
.The duplicate tests have been merged.
Most of this work was mechanical:
unittest.TestCase
subclass definition linesself
in the function parametersself.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 intest_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.