MCPcopy Create free account
hub / github.com/ElementsProject/lightning / pytest_runtest_setup

Function pytest_runtest_setup

tests/conftest.py:31–42  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

29
30
31def pytest_runtest_setup(item):
32 open_versions = [mark.args[0] for mark in item.iter_markers(name='openchannel')]
33 if open_versions:
34 if 'v1' not in open_versions and not EXPERIMENTAL_DUAL_FUND:
35 pytest.skip('v2-only test, EXPERIMENTAL_DUAL_FUND=0')
36 if 'v2' not in open_versions and EXPERIMENTAL_DUAL_FUND:
37 pytest.skip('v1-only test, EXPERIMENTAL_DUAL_FUND=1')
38 else: # If there's no openchannel marker, skip if EXP_DF
39 if EXPERIMENTAL_DUAL_FUND:
40 pytest.skip('v1-only test, EXPERIMENTAL_DUAL_FUND=1')
41 if "slow_test" in item.keywords and VALGRIND and SLOW_MACHINE:
42 pytest.skip("Skipping slow tests under VALGRIND")
43
44
45@pytest.hookimpl(tryfirst=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected