From 65c81c8a7b41bc39c88c261121ce236e12104187 Mon Sep 17 00:00:00 2001 From: Allen Guo Date: Thu, 14 Jul 2022 09:41:12 +0800 Subject: [PATCH] clean unittest.skipIf 3/N (#44290) --- .../paddle/fluid/tests/unittests/ipu/test_matmul_v2_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py | 2 -- .../paddle/fluid/tests/unittests/ipu/test_meshgrid_op_ipu.py | 2 -- .../tests/unittests/ipu/test_mixed_precision_inference_ipu.py | 2 -- .../tests/unittests/ipu/test_mixed_precision_training_ipu.py | 2 -- .../fluid/tests/unittests/ipu/test_model_parallel_ipu.py | 2 -- .../fluid/tests/unittests/ipu/test_model_pipeline_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py | 2 -- .../paddle/fluid/tests/unittests/ipu/test_not_equal_op_ipu.py | 4 ---- .../paddle/fluid/tests/unittests/ipu/test_one_hot_op_ipu.py | 2 -- .../fluid/tests/unittests/ipu/test_one_hot_v2_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_optimizer_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_p_norm_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_pad_op_ipu.py | 2 -- .../paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py | 2 -- .../paddle/fluid/tests/unittests/ipu/test_pool_max_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_pow_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_prelu_op_ipu.py | 2 -- python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py | 2 -- 19 files changed, 40 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/ipu/test_matmul_v2_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_matmul_v2_op_ipu.py index 6e84066a4a..37f575f64b 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_matmul_v2_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_matmul_v2_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py index c1d144cd56..0f60ed2485 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_mean_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_meshgrid_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_meshgrid_op_ipu.py index 4efd4c5714..8c3306aed1 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_meshgrid_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_meshgrid_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_inference_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_inference_ipu.py index ba8f9c7bad..21bcb7b731 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_inference_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_inference_ipu.py @@ -21,8 +21,6 @@ import paddle.nn.functional as F from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_training_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_training_ipu.py index 4fc3b40f9a..4524c11030 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_training_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_mixed_precision_training_ipu.py @@ -21,8 +21,6 @@ import paddle.nn.functional as F from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_model_parallel_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_model_parallel_ipu.py index 81f5295c7d..253a87a6b7 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_model_parallel_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_model_parallel_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_model_pipeline_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_model_pipeline_ipu.py index 9f7ebc5283..fb5f25619b 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_model_pipeline_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_model_pipeline_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py index 50be6420a5..a5ace5f1bf 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_mul_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_not_equal_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_not_equal_op_ipu.py index c796cc7c02..c00a60775e 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_not_equal_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_not_equal_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): @@ -90,8 +88,6 @@ class TestCase2(TestBase): self.feed_fp16 = {"x": x.astype(np.float16), "y": y.astype(np.float16)} -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestScalar(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_one_hot_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_one_hot_op_ipu.py index 6c8c3b1131..fe5b658426 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_one_hot_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_one_hot_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_one_hot_v2_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_one_hot_v2_op_ipu.py index 8822c352b8..e958cfd1f8 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_one_hot_v2_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_one_hot_v2_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_optimizer_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_optimizer_ipu.py index 5169eddc70..5041e8804a 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_optimizer_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_optimizer_ipu.py @@ -19,8 +19,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_p_norm_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_p_norm_op_ipu.py index ec333ddff0..bd6ff58751 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_p_norm_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_p_norm_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_pad_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_pad_op_ipu.py index 02a488180a..c006da3c16 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_pad_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_pad_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py index a9ffeb8dc0..8a2aa26f1c 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_pool_avg_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_pool_max_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_pool_max_op_ipu.py index e9fec9a023..dca1103a0c 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_pool_max_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_pool_max_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_pow_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_pow_op_ipu.py index 3f596f951c..8355f5eefd 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_pow_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_pow_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_prelu_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_prelu_op_ipu.py index 0200cce0a3..b80560dccb 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_prelu_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_prelu_op_ipu.py @@ -21,8 +21,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): diff --git a/python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py b/python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py index 1c050d1e48..a2da444519 100644 --- a/python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py +++ b/python/paddle/fluid/tests/unittests/ipu/test_print_op_ipu.py @@ -20,8 +20,6 @@ import paddle.static from paddle.fluid.tests.unittests.ipu.op_test_ipu import IPUOpTest -@unittest.skipIf(not paddle.is_compiled_with_ipu(), - "core is not compiled with IPU") class TestBase(IPUOpTest): def setUp(self): -- GitLab