From e5160b5a131d8edcfbfad50b6e49cf48ff34da50 Mon Sep 17 00:00:00 2001 From: Paul Balanca Date: Tue, 3 Sep 2024 11:08:03 +0100 Subject: [PATCH] Using `unittest.SkipTest` exception for skipping tests. `absltest.skip` is producing a warning with Python 3.12 --- ml_dtypes/tests/custom_float_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ml_dtypes/tests/custom_float_test.py b/ml_dtypes/tests/custom_float_test.py index 09feccb3..ce155c69 100644 --- a/ml_dtypes/tests/custom_float_test.py +++ b/ml_dtypes/tests/custom_float_test.py @@ -794,7 +794,7 @@ def testArange(self, float_type): np.arange(1, 100, dtype=float_type), ) if float_type == float8_e8m0fnu: - return absltest.skip("Skip negative ranges for E8M0.") + raise self.skipTest("Skip negative ranges for E8M0.") np.testing.assert_equal( np.arange(-8, 8, 1, dtype=np.float32).astype(float_type), @@ -975,7 +975,7 @@ def testFrexp(self, float_type): def testCopySign(self, float_type): if not dtype_is_signed(float_type): - return absltest.skip("Skip copy sign test for unsigned floating formats.") + raise self.skipTest("Skip copy sign test for unsigned floating formats.") for bits in list(range(1, 128)): with self.subTest(bits):