From 5bcf35cd59263f692d73944a6e5ec7406fd46b53 Mon Sep 17 00:00:00 2001 From: Weilong Wu Date: Fri, 2 Dec 2022 10:35:33 +0800 Subject: [PATCH] rm test_eager_guard (#48623) --- .../paddle/fluid/tests/unittests/test_tensor_to_list.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 c8f438325a..bdabea5a2b 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() -- GitLab