Test failure with `pint>=0.20`
Closed this issue · 2 comments
hassec commented
make test_physics
will throw the below error if using pint >= 0.20
======================================================================
ERROR: test_handle_units (test_omas_physics.TestOmasPhysics)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/chasse/omas/omas/tests/test_omas_physics.py", line 463, in test_handle_units
ods['equilibrium.time_slice[0].constraints.diamagnetic_flux.time_measurement'] = 8.0 * ureg.milliseconds
File "/home/chasse/omas/omas/omas_core.py", line 1057, in __setitem__
self.getraw(key[0])[key[1:]] = pass_on_value
File "/home/chasse/omas/omas/omas_core.py", line 1057, in __setitem__
self.getraw(key[0])[key[1:]] = pass_on_value
File "/home/chasse/omas/omas/omas_core.py", line 1057, in __setitem__
self.getraw(key[0])[key[1:]] = pass_on_value
[Previous line repeated 2 more times]
File "/home/chasse/omas/omas/omas_core.py", line 964, in __setitem__
and isinstance(value, pint.quantity._Quantity)
AttributeError: module 'pint' has no attribute 'quantity'
----------------------------------------------------------------------
This is because the pint.quantity
submodule no longer exists.