pint icon indicating copy to clipboard operation
pint copied to clipboard

Two test failures in pint/testsuite/benchmarks/test_10_registry.py

Open musicinmybrain opened this issue 1 year ago • 1 comments

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.

musicinmybrain avatar Dec 13 '23 20:12 musicinmybrain

I have the same issue. Is there any workaround available?

avalentino avatar Feb 03 '24 17:02 avalentino

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.

musicinmybrain avatar Jun 14 '24 13:06 musicinmybrain

Thanks for notifying. FYI the pypi registry doesn't show the latest 0.24 version, only GitHub's tags has them.

doronbehar avatar Jun 15 '24 18:06 doronbehar