Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
assert_on_file improved
...
def assert_on_file(self, path, length, lines):
with open(path, "r") as file:
lines = file.read().splitlines()
assert len(lines) == length
for index, line in enumerate(lines):
assert lines[index] == line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment