Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/legacy_test/test_cumsum_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,12 @@ def test_check_grad(self):


class BadInputTest(unittest.TestCase):
@test_with_pir_api
def test_error(self):
paddle.enable_static()
with base.program_guard(base.Program()):
with paddle.static.program_guard(
paddle.static.Program(), paddle.static.Program()
):

def test_bad_x():
data = [1, 2, 4]
Expand Down
5 changes: 5 additions & 0 deletions test/legacy_test/test_pad_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,12 @@ def test_check_grad_normal(self):
create_test_fp16(TestCase3)


@unittest.skipIf(
core.is_compiled_with_cuda(),
"core is compiled with CUDA and not support the float16",
)
class TestPadOpError(unittest.TestCase):
@test_with_pir_api
def test_errors(self):
with static_guard():
with paddle.static.program_guard(
Expand Down