We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
str
1 parent 1974e8a commit 8f2ceedCopy full SHA for 8f2ceed
cf_xarray/tests/test_units.py
@@ -51,6 +51,13 @@ def test_percent_units():
51
assert str(ureg("%").units) == "percent"
52
53
54
+def test_integer_units():
55
+ """Test that integer 1 units is equal to dimensionless"""
56
+ # need to explicitly use parse_units to bypass the runtime type checking
57
+ # in the quantity constructor
58
+ assert str(ureg.parse_units(1)) == "dimensionless"
59
+
60
61
@pytest.mark.xfail(reason="not supported by pint, yet: hgrecco/pint#1295")
62
def test_udunits_power_syntax():
63
"""Test that UDUNITS style powers are properly parsed and interpreted."""
0 commit comments