Mask `pytest` detection block in `piker.config`
Seems to be some kinda super weird env bug since we moved to using `uv`? When it triggers it also seems to cause a pretty fundamental crash that not only breaks `tractor.devx._debug` stuff but also seems to get us in a perma-hang state where no SIGINT or other sys sig will be able to kill the root proc!?!? TODO, a `gitea` issue to track so we can fix the fundamental problem as well as transitive fault in `tractor`'s core which seems to be due to the error taking place during a sub-actor's module import phase which prevents the runtime from booting fully and then the proc getting stuck in a real gnarly SIG-state..kucoin_and_binance_fix
parent
8a4901c517
commit
00108010c9
|
@ -104,14 +104,15 @@ def get_app_dir(
|
||||||
# `tractor`) with the testing dir and check for it whenever we
|
# `tractor`) with the testing dir and check for it whenever we
|
||||||
# detect `pytest` is being used (which it isn't under normal
|
# detect `pytest` is being used (which it isn't under normal
|
||||||
# operation).
|
# operation).
|
||||||
if "pytest" in sys.modules:
|
# if "pytest" in sys.modules:
|
||||||
import tractor
|
# import tractor
|
||||||
actor = tractor.current_actor(err_on_no_runtime=False)
|
# actor = tractor.current_actor(err_on_no_runtime=False)
|
||||||
if actor: # runtime is up
|
# if actor: # runtime is up
|
||||||
rvs = tractor._state._runtime_vars
|
# rvs = tractor._state._runtime_vars
|
||||||
testdirpath = Path(rvs['piker_vars']['piker_test_dir'])
|
# import pdbp; pdbp.set_trace()
|
||||||
assert testdirpath.exists(), 'piker test harness might be borked!?'
|
# testdirpath = Path(rvs['piker_vars']['piker_test_dir'])
|
||||||
app_name = str(testdirpath)
|
# assert testdirpath.exists(), 'piker test harness might be borked!?'
|
||||||
|
# app_name = str(testdirpath)
|
||||||
|
|
||||||
if platform.system() == 'Windows':
|
if platform.system() == 'Windows':
|
||||||
key = "APPDATA" if roaming else "LOCALAPPDATA"
|
key = "APPDATA" if roaming else "LOCALAPPDATA"
|
||||||
|
|
Loading…
Reference in New Issue