mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
pyln-testing: Do not require a conftest.py to annotate tests
In the c-lightning tests we have `tests/conftest.py` which annotates test function with the outcome. If we use pyln-testing outside of the c-lightning tree we cannot rely on that annotation being there, so we assume it passed.
This commit is contained in:
parent
3c5ed15b2c
commit
9e59740268
@ -47,7 +47,8 @@ def directory(request, test_base_dir, test_name):
|
||||
# determine whether we succeeded or failed. Outcome can be None if the
|
||||
# failure occurs during the setup phase, hence the use to getattr instead
|
||||
# of accessing it directly.
|
||||
outcome = getattr(request.node, 'rep_call', None).outcome
|
||||
rep_call = getattr(request.node, 'rep_call', None)
|
||||
outcome = 'passed' if rep_call is None else rep_call.outcome
|
||||
failed = not outcome or request.node.has_errors or outcome != 'passed'
|
||||
|
||||
if not failed:
|
||||
|
Loading…
Reference in New Issue
Block a user