Update test_non_int.py for pytest. #1603
Merged
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.
Tests in test_non_int.py were not being discovered by pytest because the class names did not start with Test; they also had a few incompatibilities with pytest, which were hidden as a result of the tests not being run. This commit both enables the tests to be discovered and updates them for pytest:
Class names are changed.
Dead code (FakeWrapper) is removed.
Non-float assert_quantity_almost_equal is fixed.
Parametrization, capture_log, subTests are updated for pytest.
kwargs/constants are updated for pytest.
caplog in test_quantity_creation tests for specific message.
Class inheritance is changed to properly run setup_class and special assert_quantity_almost_equal.
Closes # (insert issue number) (N/A, but see String NaN creation with correct non_int_type #1600.
Executed
pre-commit run --all-files
with no errorsThe change is fully covered by automated unit tests
Documented in docs/ as appropriate
Added an entry to the CHANGES file