Skip to content

Commit

Permalink
fixing path.unlink for py37
Browse files Browse the repository at this point in the history
  • Loading branch information
gjedlicska committed Sep 27, 2022
1 parent 8812985 commit 625bd5c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/test_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,15 @@ def test_get_transport_with_token():
@pytest.fixture
def user_path() -> Path:
path = accounts_path().joinpath("test_acc.json")
path.unlink(missing_ok=True)
# hey, py37 doesn't support the missing_ok argument
try:
path.unlink()
except:
pass
try:
path.unlink(missing_ok=True)
except:
pass
path.parent.absolute().mkdir(exist_ok=True)
yield path
path.unlink()
Expand Down

0 comments on commit 625bd5c

Please sign in to comment.