提交 4fc59917 编写于 作者: Q qiaolongfei

update test for fake reader decorator

上级 bda05dc3
......@@ -211,11 +211,12 @@ class TestFakeReader(unittest.TestCase):
data_num = 100
fake_reader = paddle.reader.fake(reader, data_num)
i = 0
for data in fake_reader():
self.assertEqual(data, 0)
i += 1
self.assertEqual(i, data_num)
for _ in range(10):
i = 0
for data in fake_reader():
self.assertEqual(data, 0)
i += 1
self.assertEqual(i, data_num)
if __name__ == '__main__':
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册