diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py index 65b571e79cf76c765b896e6abdb76a0f540b6323..cc6b8a7847969b781ceeb2c4bdc9713961580941 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bert.py @@ -281,5 +281,4 @@ class TestBert(unittest.TestCase): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py index 17b5282903dc5511c31cb9a4b436bd9d4e18c0e1..f993df38f0a33eb515b59621ff6d306a3706cd5b 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_bmn.py @@ -880,5 +880,4 @@ class TestTrain(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py index f81c2d53640f55e931d66ac7c909250abd367a0a..7ae9248cc387921261ef88b4e9b4eebbb1ddab98 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_break_continue.py @@ -292,5 +292,4 @@ class TestOptimBreakInWhile(TestContinueInWhile): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py index a47a5cfe1dad4edd844ee7816d7e888481445b82..5121de5e6a03b62e8b57366edd6d2ad45a0c4682 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_cycle_gan.py @@ -723,5 +723,4 @@ class TestCycleGANModel(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py index cbd4fd85de39cf2c0585b50c00f71a2b3ace33a1..08066874a06300ad79b08e28e2806fb900da5446 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_duplicate_output.py @@ -58,5 +58,4 @@ class TestDuplicateOutput(unittest.TestCase): if __name__ == '__main__': - with paddle.fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py index c9c68eeafd92f44b95fb4c65640916e0774668af..edb3a3b9d3829277f8f3a9e44c5e460e082ed981 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_ifelse.py @@ -509,5 +509,4 @@ class TestDy2StIfElseBackward(unittest.TestCase): if __name__ == '__main__': - with paddle.fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py index dc1eedcc8d23f501b2a62e97fbd9d08adb03eed3..7a5fbbc08424347710a30562dade3f3ebd5f1924 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_lac.py @@ -709,5 +709,4 @@ class TestLACModel(unittest.TestCase): if __name__ == "__main__": - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main() diff --git a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py index 06b17978d6687ff2fa9487475ac5159653003864..3e3382b47a09f4a3602d90be689c191bae82647d 100644 --- a/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py +++ b/python/paddle/fluid/tests/unittests/dygraph_to_static/test_loop.py @@ -442,5 +442,4 @@ class TestErrorInForLoop(TestTransformForLoop): if __name__ == '__main__': - with fluid.framework._test_eager_guard(): - unittest.main() + unittest.main()