Skip to content

Instantly share code, notes, and snippets.

@chelseatroy
Created December 24, 2019 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chelseatroy/1cfa6cb38a13b66c9f464557e4d2ce69 to your computer and use it in GitHub Desktop.
Save chelseatroy/1cfa6cb38a13b66c9f464557e4d2ce69 to your computer and use it in GitHub Desktop.
assert_on_file
...
def assert_on_file(self, path, length, lines):
with open(path, "r") as file:
lines = file.read().split("\n")
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