test_predict.py:223, test_predict.py (get_onsky_data) and
test_comet.py:216 invoke the CLI as a subprocess:
result = subprocess.run(["layup", "predict", str(input_file), ...])
assert result.returncode == 0
"layup" resolves against PATH, so the test exercises whatever installation
comes first -- not necessarily the working tree. On this machine that is a conda
env with a broken assist/rebound link, and all three fail with
assert 1 == 0 and an unrelated OSError: dlopen ... librebound...so. Putting
the intended environment's bin first makes all three pass, with no code change.
The failure mode is the bad one: it looks like a code regression, and the real
message is buried in captured stderr. It can also pass for the wrong reason,
testing a stale install while the working tree is broken.
Suggest [sys.executable, "-m", ...], or resolving the entry point relative to
sys.executable, so the subprocess inherits the interpreter under test.
test_predict.py:223,test_predict.py(get_onsky_data) andtest_comet.py:216invoke the CLI as a subprocess:"layup"resolves against PATH, so the test exercises whatever installationcomes first -- not necessarily the working tree. On this machine that is a conda
env with a broken assist/rebound link, and all three fail with
assert 1 == 0and an unrelatedOSError: dlopen ... librebound...so. Puttingthe intended environment's
binfirst makes all three pass, with no code change.The failure mode is the bad one: it looks like a code regression, and the real
message is buried in captured stderr. It can also pass for the wrong reason,
testing a stale install while the working tree is broken.
Suggest
[sys.executable, "-m", ...], or resolving the entry point relative tosys.executable, so the subprocess inherits the interpreter under test.