Created
December 24, 2019 15:28
-
-
Save chelseatroy/0fa9a606f2dd20e00ab0410259825d9e to your computer and use it in GitHub Desktop.
assert_on_file improved
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().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