diff --git a/tests/test_14_read_only_list_file.py b/tests/test_14_read_only_list_file.py index 33bdc5de..d81d9e37 100644 --- a/tests/test_14_read_only_list_file.py +++ b/tests/test_14_read_only_list_file.py @@ -19,7 +19,8 @@ def test_read_only_list_file(): assert len(_read_only) == 0 with open(FILE_NAME, "w") as fp: - fp.writelines(line + '\n' for line in ["one", "two", "three"]) + for line in ["one", "two", "three"]: + fp.write(line + '\n') assert len(_read_only) == 3 assert set(_read_only) == {"one", "two", "three"}