diff --git a/python/paddle/fluid/tests/unittests/test_data_generator.py b/python/paddle/fluid/tests/unittests/test_data_generator.py index 221b9ba7683de164dfd002c7157f22d61d2ed6a5..6381cb364026369734f1de3747d50cc1ca17d5ef 100644 --- a/python/paddle/fluid/tests/unittests/test_data_generator.py +++ b/python/paddle/fluid/tests/unittests/test_data_generator.py @@ -109,29 +109,6 @@ class TestMultiSlotStringDataGenerator(unittest.TestCase): my_ms_dg.run_from_memory() -class TestMultiSlotStringDataGenerator_2(unittest.TestCase): - def test_MyMultiSlotStringDataGenerator_stdin(self): - plats = platform.platform() - if 'Linux' not in plats: - print("skip pipecommand UT on MacOS/Win") - return - with open("test_queue_dataset_run_a.txt", "w") as f: - data = "2 1 2\n" - data += "2 6 2\n" - data += "2 5 2\n" - data += "2 7 2\n" - f.write(data) - - tmp = os.popen( - "cat test_queue_dataset_run_a.txt | python my_data_generator.py" - ).readlines() - expected_res = [ - '1 2 1 1 1 2\n', '1 2 1 6 1 2\n', '1 2 1 5 1 2\n', '1 2 1 7 1 2\n' - ] - self.assertEqual(tmp, expected_res) - os.remove("./test_queue_dataset_run_a.txt") - - class TestMultiSlotDataGenerator_error(unittest.TestCase): def test_MultiSlotDataGenerator_error(self): with self.assertRaises(ValueError):