Created
December 24, 2019 15:27
-
-
Save chelseatroy/1cfa6cb38a13b66c9f464557e4d2ce69 to your computer and use it in GitHub Desktop.
assert_on_file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
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