Skip to content

Commit

Permalink
add some test
Browse files Browse the repository at this point in the history
  • Loading branch information
gouzil committed Oct 15, 2023
1 parent 211db2b commit 7bc46e3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/legacy_test/test_math_op_patch_pir.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@


class TestMathOpPatchesPir(unittest.TestCase):
def test_item(self):
with paddle.pir_utils.IrGuard():
x = paddle.static.data(name='x', shape=[3, 2, 1])
with self.assertRaises(TypeError):
x.item()

def test_some_dim(self):
with paddle.pir_utils.IrGuard():
x = paddle.static.data(name='x', shape=[3, 2, 1])
Expand Down

0 comments on commit 7bc46e3

Please sign in to comment.