Make config grab _testing dir in pytest env,

- Remove print statements
explicit_write_pps_on_exit
algorandpa 2023-02-13 11:01:02 -05:00 committed by jaredgoldman
parent 95b9dacb7a
commit b180602a3e
2 changed files with 4 additions and 4 deletions

View File

@ -1351,7 +1351,7 @@ async def maybe_open_trade_relays(
loglevel, loglevel,
) )
yield relay, feed, client_ready yield relay, feed, client_ready
print("ABOUT TO OPEN CACHED MNGR")
async with tractor.trionics.maybe_open_context( async with tractor.trionics.maybe_open_context(
acm_func=cached_mngr, acm_func=cached_mngr,
kwargs={ kwargs={
@ -1365,7 +1365,6 @@ async def maybe_open_trade_relays(
cache_hit, cache_hit,
(relay, feed, client_ready) (relay, feed, client_ready)
): ):
print("YIELDING RELAY")
yield relay, feed, client_ready 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 dot instead of the XDG config home or darwin's
application support folder. application support folder.
""" """
def _posixify(name): def _posixify(name):
return "-".join(name.split()).lower() return "-".join(name.split()).lower()
if "pytest" in sys.modules:
app_name += '/_testing'
# if WIN: # if WIN:
if platform.system() == 'Windows': if platform.system() == 'Windows':
key = "APPDATA" if roaming else "LOCALAPPDATA" key = "APPDATA" if roaming else "LOCALAPPDATA"
@ -94,7 +96,6 @@ def get_app_dir(app_name, roaming=True, force_posix=False):
_posixify(app_name), _posixify(app_name),
) )
_config_dir = _click_config_dir = get_app_dir('piker') _config_dir = _click_config_dir = get_app_dir('piker')
_parent_user = os.environ.get('SUDO_USER') _parent_user = os.environ.get('SUDO_USER')