Skip to content

Commit

Permalink
TST: fix test_contents_unstaged outside git clones
Browse files Browse the repository at this point in the history
Signed-off-by: Filipe Laíns <lains@riseup.net>
  • Loading branch information
FFY00 committed Jul 7, 2022
1 parent 7dbcf4b commit 5fd88a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_sdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,11 @@ def bar():
old_data = f.read()

try:
with in_git_repo_context(), open('pure.py', 'w') as f, open('crap', 'x'):
f.write(new_data)
with in_git_repo_context():
with open('pure.py', 'w') as f, open('crap', 'x'):
f.write(new_data)

sdist_path = mesonpy.build_sdist(os.fspath(tmpdir))
sdist_path = mesonpy.build_sdist(os.fspath(tmpdir))
finally:
with open('pure.py', 'w') as f:
f.write(old_data)
Expand Down

0 comments on commit 5fd88a1

Please sign in to comment.