[Draft] TEST: Run all tests through pytest
#2090
Draft
+41
−44
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.
Description
Currently, unit tests execute through a mixture of built-in
unittest
andpytest
.From the commit history, it looks like initial tests were added using python's built-in
unittest
framework, and then subsequent tests were introduced usingpytest
.Compared to
unittest
,pytest
has a much nicer output format, offers many options for how to execute tests and how to see their outputs, and has plugins that allow it do extra things which the built-in cannot when desired (e.g. JSON outputs, test coverage reports, etc.).This PR switches the automated scripts to execute all of the tests using
pytest
. This doesn't change what tests were executed - just usespytest
as the runner.One challenge here is how each of these interprets the path from where modules are imported - here I'm trying to control these with the
PYTHONPATH
variable whenpytest
is called within shell scripts, but don't know if this will work out for all the variants under which tests are executed.Checklist to comply with before moving PR from draft:
PR completeness and readability
Testing
Performance