[train] Fix assertion in test (#20893)

This commit is contained in:
Siyuan (Ryans) Zhuang 2021-12-05 17:47:43 -08:00 committed by GitHub
parent b4790900f5
commit 3285bb6b9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -298,7 +298,7 @@ def test_run_iterator(ray_start_2_cpus):
count = 0
for results in iterator:
assert (value["index"] == count for value in results)
assert all(value["index"] == count for value in results)
count += 1
assert count == 3