Skip to content

Commit

Permalink
Using unittest.SkipTest exception for skipping tests.
Browse files Browse the repository at this point in the history
`absltest.skip` is producing a warning with Python 3.12
  • Loading branch information
balancap committed Sep 4, 2024
1 parent 4bb337e commit e5160b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ml_dtypes/tests/custom_float_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit e5160b5

Please sign in to comment.