diff --git a/python/tensorstore/tests/bfloat16_test.py b/python/tensorstore/tests/bfloat16_test.py index f15a9c156..ec253cd80 100644 --- a/python/tensorstore/tests/bfloat16_test.py +++ b/python/tensorstore/tests/bfloat16_test.py @@ -139,14 +139,13 @@ def test_add(): assert math.isnan(float(bfloat16(3.5) + bfloat16(float("nan")))) # Test type promotion against Numpy scalar values. + # See ml_dtypes.custom_float_test.py for comprehensive tests. assert np.float32 == type(bfloat16(3.5) + np.float16(2.25)) assert np.float32 == type(np.float16(3.5) + bfloat16(2.25)) assert np.float32 == type(bfloat16(3.5) + np.float32(2.25)) assert np.float32 == type(np.float32(3.5) + bfloat16(2.25)) assert np.float64 == type(bfloat16(3.5) + np.float64(2.25)) assert np.float64 == type(np.float64(3.5) + bfloat16(2.25)) - assert np.float64 == type(bfloat16(3.5) + float(2.25)) - assert np.float64 == type(float(3.5) + bfloat16(2.25)) assert np.float32 == type(bfloat16(3.5) + np.array(2.25, np.float32)) assert np.float32 == type(np.array(3.5, np.float32) + bfloat16(2.25)) diff --git a/python/tensorstore/tests/tensorstore_test.py b/python/tensorstore/tests/tensorstore_test.py index 55e6454fc..3b3f55b1c 100644 --- a/python/tensorstore/tests/tensorstore_test.py +++ b/python/tensorstore/tests/tensorstore_test.py @@ -120,7 +120,7 @@ async def test_array(): async def test_array_no_copy(): with pytest.raises( - ValueError, match=r"Unable to avoid copy while creating an array\." + ValueError, match=r"Unable to avoid copy while creating an array" ): ts.array([1, 2, 3], copy=False) @@ -157,7 +157,7 @@ async def test_array_no_write(): with pytest.raises( ValueError, - match=r"Unable to avoid copy while creating an array from given array\.", + match=r"Unable to avoid copy while creating an array", ): ts.array(x, write=True, copy=False)