Add back cleanup fixture
parent
43a68ef700
commit
cf0b85aa51
|
@ -30,7 +30,7 @@ from bidict import bidict
|
|||
import toml
|
||||
|
||||
from .log import get_logger
|
||||
|
||||
from tests.test_services import get_test_app_dir
|
||||
log = get_logger('broker-config')
|
||||
|
||||
# taken from ``click`` since apparently they have some
|
||||
|
@ -78,7 +78,7 @@ def get_app_dir(app_name, roaming=True, force_posix=False):
|
|||
# within the tractor runtimes and store testing config data
|
||||
# outside of the users filesystem
|
||||
if "pytest" in sys.modules:
|
||||
app_name += '/_testing'
|
||||
return get_test_app_dir()
|
||||
|
||||
# if WIN:
|
||||
if platform.system() == 'Windows':
|
||||
|
|
|
@ -32,13 +32,13 @@ from exceptiongroup import BaseExceptionGroup
|
|||
|
||||
log = get_logger(__name__)
|
||||
|
||||
@pytest.fixture
|
||||
@pytest.fixture(scope="session")
|
||||
def paper_cleanup():
|
||||
yield
|
||||
app_dir = get_app_dir('piker')
|
||||
# if os.path.isfile(app_dir):
|
||||
# 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,
|
||||
|
|
Loading…
Reference in New Issue