diff --git a/tests/unit/test_quantity.py b/tests/unit/test_quantity.py index da4ffc5..3383441 100644 --- a/tests/unit/test_quantity.py +++ b/tests/unit/test_quantity.py @@ -233,7 +233,9 @@ def test_gt(): assert jnp.array_equal(q > Quantity(1, u.m), jnp.array([False, True, True])) # Test with incompatible units - assert jnp.array_equal(q > Quantity(0, u.s), jnp.array([False, False, False])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q > Quantity(0, u.s) def test_ge(): @@ -251,7 +253,9 @@ def test_ge(): assert jnp.array_equal(q >= Quantity(2, u.m), jnp.array([False, True, True])) # Test with incompatible units - assert jnp.array_equal(q >= Quantity(0, u.s), jnp.array([False, False, False])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q >= Quantity(0, u.s) def test_lt(): @@ -269,7 +273,9 @@ def test_lt(): assert jnp.array_equal(q < Quantity(2, u.m), jnp.array([True, False, False])) # Test with incompatible units - assert jnp.array_equal(q < Quantity(0, u.s), jnp.array([False, False, False])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q < Quantity(0, u.s) def test_le(): @@ -287,7 +293,9 @@ def test_le(): assert jnp.array_equal(q <= Quantity(2, u.m), jnp.array([True, True, False])) # Test with incompatible units - assert jnp.array_equal(q <= Quantity(0, u.s), jnp.array([False, False, False])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q <= Quantity(0, u.s) def test_eq(): @@ -305,7 +313,9 @@ def test_eq(): assert jnp.array_equal(q == Quantity(2, u.m), jnp.array([False, True, False])) # Test with incompatible units - assert jnp.array_equal(q == Quantity(0, u.s), jnp.array([False, False, False])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q == Quantity(0, u.s) def test_ne(): @@ -323,8 +333,11 @@ def test_ne(): assert jnp.array_equal(q != Quantity(2, u.m), jnp.array([True, False, True])) # Test with incompatible units - assert jnp.array_equal(q != Quantity(0, u.s), jnp.array([True, True, True])) - assert jnp.array_equal(q != Quantity(4, u.s), jnp.array([True, True, True])) + # TODO: better equinox exception matching + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q != Quantity(0, u.s) + with pytest.raises(Exception): # noqa: B017, PT011 + _ = q != Quantity(4, u.s) def test_neg(): diff --git a/uv.lock b/uv.lock index f277795..58d6039 100644 --- a/uv.lock +++ b/uv.lock @@ -1621,6 +1621,8 @@ version = "6.0.0" source = { registry = "https://pypi.org/simple" } sdist = { url = "https://files.pythonhosted.org/packages/18/c7/8c6872f7372eb6a6b2e4708b88419fb46b857f7a2e1892966b851cc79fc9/psutil-6.0.0.tar.gz", hash = "sha256:8faae4f310b6d969fa26ca0545338b21f73c6b15db7c4a8d934a5482faa818f2", size = 508067 } wheels = [ + { url = "https://files.pythonhosted.org/packages/c5/66/78c9c3020f573c58101dc43a44f6855d01bbbd747e24da2f0c4491200ea3/psutil-6.0.0-cp27-none-win32.whl", hash = "sha256:02b69001f44cc73c1c5279d02b30a817e339ceb258ad75997325e0e6169d8b35", size = 249766 }, + { url = "https://files.pythonhosted.org/packages/e1/3f/2403aa9558bea4d3854b0e5e567bc3dd8e9fbc1fc4453c0aa9aafeb75467/psutil-6.0.0-cp27-none-win_amd64.whl", hash = "sha256:21f1fb635deccd510f69f485b87433460a603919b45e2a324ad65b0cc74f8fb1", size = 253024 }, { url = "https://files.pythonhosted.org/packages/0b/37/f8da2fbd29690b3557cca414c1949f92162981920699cd62095a984983bf/psutil-6.0.0-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:c588a7e9b1173b6e866756dde596fd4cad94f9399daf99ad8c3258b3cb2b47a0", size = 250961 }, { url = "https://files.pythonhosted.org/packages/35/56/72f86175e81c656a01c4401cd3b1c923f891b31fbcebe98985894176d7c9/psutil-6.0.0-cp36-abi3-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6ed2440ada7ef7d0d608f20ad89a04ec47d2d3ab7190896cd62ca5fc4fe08bf0", size = 287478 }, { url = "https://files.pythonhosted.org/packages/19/74/f59e7e0d392bc1070e9a70e2f9190d652487ac115bb16e2eff6b22ad1d24/psutil-6.0.0-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5fd9a97c8e94059b0ef54a7d4baf13b405011176c3b6ff257c247cae0d560ecd", size = 290455 }, @@ -2338,7 +2340,7 @@ wheels = [ [[package]] name = "unxt" -version = "0.17.2.dev17+ga80ece9" +version = "0.19.1.dev2+g5468fcd.d20241022" source = { editable = "." } dependencies = [ { name = "astropy" }, @@ -2353,6 +2355,7 @@ dependencies = [ { name = "quax" }, { name = "quaxed" }, { name = "xmmutablemap" }, + { name = "zeroth" }, ] [package.optional-dependencies] @@ -2360,7 +2363,6 @@ all = [ { name = "astropy" }, { name = "gala" }, { name = "matplotlib" }, - { name = "zeroth" }, ] backend-astropy = [ { name = "astropy" }, @@ -2387,7 +2389,6 @@ dev = [ { name = "pytest-mpl" }, { name = "pytkdocs-tweaks" }, { name = "sybil" }, - { name = "zeroth" }, ] docs = [ { name = "griffe" }, @@ -2407,7 +2408,6 @@ interop-gala = [ ] interop-mpl = [ { name = "matplotlib" }, - { name = "zeroth" }, ] test = [ { name = "hypothesis", extra = ["numpy"] }, @@ -2428,7 +2428,6 @@ test-all = [ { name = "pytest-github-actions-annotate-failures" }, { name = "pytest-mpl" }, { name = "sybil" }, - { name = "zeroth" }, ] test-mpl = [ { name = "pytest-mpl" }, @@ -2462,8 +2461,8 @@ requires-dist = [ { name = "hypothesis", extras = ["numpy"], marker = "extra == 'test'" }, { name = "hypothesis", extras = ["numpy"], marker = "extra == 'test-all'" }, { name = "is-annotated", specifier = ">=1.0" }, - { name = "jax", specifier = ">0.4" }, - { name = "jaxlib", specifier = ">0.4" }, + { name = "jax", specifier = ">0.4.32" }, + { name = "jaxlib", specifier = ">0.4.32" }, { name = "jaxtyping", specifier = ">=0.2.34" }, { name = "jinja2", marker = "extra == 'dev'", specifier = "==3.1" }, { name = "jinja2", marker = "extra == 'docs'", specifier = "==3.1" }, @@ -2512,10 +2511,7 @@ requires-dist = [ { name = "sybil", marker = "extra == 'test'" }, { name = "sybil", marker = "extra == 'test-all'" }, { name = "xmmutablemap", specifier = ">=0.1" }, - { name = "zeroth", marker = "extra == 'all'" }, - { name = "zeroth", marker = "extra == 'dev'" }, - { name = "zeroth", marker = "extra == 'interop-mpl'" }, - { name = "zeroth", marker = "extra == 'test-all'" }, + { name = "zeroth" }, ] [package.metadata.requires-dev]