pint
pint copied to clipboard
Two test failures in pint/testsuite/benchmarks/test_10_registry.py
On Fedora Linux 39, x86_64
, with Python 3.12.0:
gh repo clone hgrecco/pint
cd pint
git checkout 0.23
python3 -m venv _e
. _e/bin/activate
pip install -e .[test,numpy,xarray,dask]
pytest
The extras I install here correspond to those with satisfiable dependencies in Fedora Rawhide.
============================== short test summary info ===============================
FAILED pint/testsuite/test_compat_upcast.py::test_quantification - AttributeError: 'float' object has no attribute 'units'
FAILED pint/testsuite/test_compat_upcast.py::test_dataset_operation_with_unit - pint.errors.DimensionalityError: Cannot convert from 'dimensionless' to 'kelvin'
FAILED pint/testsuite/benchmarks/test_10_registry.py::test_load_definitions_stage_2[None] - ValueError: Group USCSLengthInternational already present in registry
FAILED pint/testsuite/benchmarks/test_10_registry.py::test_load_definitions_stage_2[True] - ValueError: Group USCSLengthInternational already present in registry
This issue is about the last two failures because those are the two I see in a downstream RPM build, although the first two errors may also be of interest.
I have the same issue. Is there any workaround available?
It looks like this was fixed between 0.23 and 0.24. I can still reproduce this with the original instructions, but not if I git checkout 0.24
. I didn’t bother bisecting it to a particular commit.
Thanks for notifying. FYI the pypi registry doesn't show the latest 0.24 version, only GitHub's tags has them.