More idiomatic way of checking if all items on a list are same

pull/161/head
yuvipanda 2017-12-01 00:46:29 -08:00
rodzic 4419890c01
commit b4f012799b
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -96,4 +96,5 @@ def test_memlimit_same_postbuild():
for fp in filepaths:
with open(fp) as f:
file_contents.append(f.read())
assert all(c == file_contents[0] for c in file_contents)
# Make sure they're all the same
assert len(set(file_contents)) == 1