Skip to content

Commit

Permalink
Update test_non_int.py for pytest.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cgevans committed Oct 9, 2022
1 parent 9db2b29 commit 0462e8e
Show file tree
Hide file tree
Showing 2 changed files with 280 additions and 202 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Pint Changelog
- Move ASV benchmarks to dedicated folder. (Issue #1542)
- Fix a recursion error that would be raised when passing quantities to `cond` and `x`.
(Issue #1510, #1530)
- Update test_non_int tests for pytest.

0.19.2 (2022-04-23)
-------------------
Expand Down
Loading

0 comments on commit 0462e8e

Please sign in to comment.