From 625bd5cd84baae4faff1f1ed65b01d285e8ffb3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20Jedlicska?= Date: Tue, 27 Sep 2022 15:13:29 +0200 Subject: [PATCH] fixing path.unlink for py37 --- tests/test_wrapper.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index 9c9c92c5..a818f3c0 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py @@ -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()