Created
February 19, 2022 18:25
-
-
Save tkutcher/04248ca80867d179e40d6fe85508f2b7 to your computer and use it in GitHub Desktop.
Python File IO Demo 5
This file contains 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 test_writes_config_properly(tmpdir): | |
dest_path = pathlib.Path(tmpdir) / "example-output.json" | |
assert not dest_path.exists() | |
config = MyConfig(x="4", y="18") | |
write_to_file(config, dest) | |
assert dest_path.exists() | |
assert read_from_file(dest_path).x == "4" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment