Skip to content

Commit

Permalink
fixup! Add support for --nest=... --hosts=cache://...
Browse files Browse the repository at this point in the history
  • Loading branch information
ydirson committed Sep 19, 2024
1 parent db3d94c commit e1b48bc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,13 @@ def _cleanup_hosts():
try:
host_list = [setup_host(hostname_or_ip, config=pytestconfig)
for hostname_or_ip in hostname_list]
except Exception:
_cleanup_hosts()
raise

if not host_list:
pytest.fail("This test requires at least one --hosts parameter")
yield host_list
if not host_list:
pytest.fail("This test requires at least one --hosts parameter")
yield host_list

_cleanup_hosts
finally:
_cleanup_hosts

@pytest.fixture(scope='session')
def registered_xo_cli():
Expand Down

0 comments on commit e1b48bc

Please sign in to comment.