Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support pytest on python 3.12 wrt Fraction formatting change
python 3.12 supports float-style formatting for Fraction by python/cpython#100161 . With this change, when ":n" format specifier is used in format() for Fraction type, this now raises ValueError instead of previous TypeError. To make pytest succeed with python 3.12, make pint.testing.assert_allclose also rescue ValueError . Fixes #1818 .
- Loading branch information