diff --git a/python/paddle/fluid/tests/unittests/test_tensor_to_list.py b/python/paddle/fluid/tests/unittests/test_tensor_to_list.py index c8f438325ae30bb9d9d52cbc82812664ea34d0f1..bdabea5a2bbe6e6591b55d6abfc74605363cdaac 100644 --- a/python/paddle/fluid/tests/unittests/test_tensor_to_list.py +++ b/python/paddle/fluid/tests/unittests/test_tensor_to_list.py @@ -18,14 +18,13 @@ import numpy as np import paddle import paddle.fluid as fluid -from paddle.fluid.framework import _test_eager_guard class TensorToListTest(unittest.TestCase): def setUp(self): self.shape = [11, 25, 32, 43] - def func_tensor_tolist(self): + def test_tensor_tolist(self): places = [fluid.CPUPlace()] if fluid.core.is_compiled_with_cuda(): places.append(fluid.CUDAPlace(0)) @@ -42,11 +41,6 @@ class TensorToListTest(unittest.TestCase): self.assertEqual(tensorlist, expectlist) - def test_tensor_tolist(self): - with _test_eager_guard(): - self.func_tensor_tolist() - self.func_tensor_tolist() - if __name__ == '__main__': unittest.main()