Skip to content

Commit

Permalink
simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
obestwalter committed May 20, 2019
1 parent dd55b1d commit d26174b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def test_config_backup_is_not_overwritten(tmp_path):
"""Given an existing backup it is not overwritten by subsequent builds."""
firstThing = "first thing"
somePath = tmp_path / "some-path.txt"
backupPath = Path(str(somePath) + ".bak")
somePath.write_text(firstThing)
persist_results({somePath: firstThing})
assert (Path(str(somePath) + ".bak")).read_text() == firstThing
somePath.write_text(firstThing)
assert backupPath.read_text() == firstThing
otherThing = "other thing"
persist_results({somePath: otherThing})
assert somePath.read_text() == otherThing
assert (Path(str(somePath) + ".bak")).read_text() == firstThing
assert backupPath.read_text() == firstThing

0 comments on commit d26174b

Please sign in to comment.