From 3acc424c3e21c61ca714543e707873354e4135ac Mon Sep 17 00:00:00 2001 From: algorandpa Date: Tue, 14 Feb 2023 20:02:36 -0500 Subject: [PATCH] only clean up if _testing file exists --- tests/test_paper.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_paper.py b/tests/test_paper.py index 16785afb..36ab2e91 100644 --- a/tests/test_paper.py +++ b/tests/test_paper.py @@ -36,8 +36,9 @@ log = get_logger(__name__) def paper_cleanup(): yield app_dir = get_app_dir('piker') - rmtree(app_dir) - assert not os.path.isfile(app_dir) + if os.path.isfile(app_dir) + rmtree(app_dir) + assert not os.path.isfile(app_dir) def test_paper_trade( open_test_pikerd: AsyncContextManager,