fix typing for test_ops (#6520)

mostly passed TYPED=1 python3 -m pytest -n=auto test/test_ops.py.

one last test specifically set an invalid value to test the exception, and to ignore that we need to import typeguard. And to get a working version of typeguard, we would need to get rid of dependency on tensorflow_addons because it requires a very old version of typeguard
This commit is contained in:
chenyu
2024-09-15 06:18:36 -04:00
committed by GitHub
parent cd90092f14
commit b2c286f567
3 changed files with 6 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ class TestOps(unittest.TestCase):
with self.assertRaises(ValueError): method((2, -3, 0))
def test_negative_dims_full(self):
with self.assertRaises(ValueError): Tensor.full(-3, 2)
with self.assertRaises(ValueError): Tensor.full((-3,), 2)
with self.assertRaises(ValueError): Tensor.full((2, -3), 4)
with self.assertRaises(ValueError): Tensor.full((2, -3, 0), 4)