Skip to content

Commit

Permalink
Make sure backup file is deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Mar 14, 2024
1 parent 4e34e63 commit f31f990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_impls.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def check_initial_contents(filename):

with tempfile.TemporaryDirectory() as d:
commit_file = os.path.join(d, "commit-file")
bkp_commit_file = os.path.join(d, ".commit-file.rapids-build-backend.bak")
if initial_contents is not None:
with open(commit_file, "w") as f:
f.write(initial_contents)
Expand All @@ -38,8 +39,7 @@ def check_initial_contents(filename):
with _edit_git_commit(config):
with open(commit_file) as f:
assert f.read() == "abc123\n"
check_initial_contents(
os.path.join(d, ".commit-file.rapids-build-backend.bak")
)
check_initial_contents(bkp_commit_file)

assert not os.path.exists(bkp_commit_file)
check_initial_contents(commit_file)

0 comments on commit f31f990

Please sign in to comment.