Make config grab _testing dir in pytest env,

- Remove print statements
paper_trade_improvements_rebase
algorandpa 2023-02-13 11:01:02 -05:00 committed by jaredgoldman
parent 5b0ed6c274
commit 8c568d1b2a
2 changed files with 4 additions and 4 deletions

View File

@ -1351,7 +1351,7 @@ async def maybe_open_trade_relays(
loglevel,
)
yield relay, feed, client_ready
print("ABOUT TO OPEN CACHED MNGR")
async with tractor.trionics.maybe_open_context(
acm_func=cached_mngr,
kwargs={
@ -1365,7 +1365,6 @@ async def maybe_open_trade_relays(
cache_hit,
(relay, feed, client_ready)
):
print("YIELDING RELAY")
yield relay, feed, client_ready

View File

@ -71,10 +71,12 @@ def get_app_dir(app_name, roaming=True, force_posix=False):
dot instead of the XDG config home or darwin's
application support folder.
"""
def _posixify(name):
return "-".join(name.split()).lower()
if "pytest" in sys.modules:
app_name += '/_testing'
# if WIN:
if platform.system() == 'Windows':
key = "APPDATA" if roaming else "LOCALAPPDATA"
@ -94,7 +96,6 @@ def get_app_dir(app_name, roaming=True, force_posix=False):
_posixify(app_name),
)
_config_dir = _click_config_dir = get_app_dir('piker')
_parent_user = os.environ.get('SUDO_USER')