pytest-xdistの実行ホストは既存のホストを想定しているようだが、--txオプションを(pytest-xdistがパースする前に)フックすることで動的にワーカー起動が可能となる。
def pytest_sessionstart(session):
tx = session.config.getoption('--tx')
if tx == ['hook']:
### start worker
tx[:] = ['ssh=worker']
Go to list of users who liked
More than 3 years have passed since last update.
pytest-xdistの実行ホストは既存のホストを想定しているようだが、--txオプションを(pytest-xdistがパースする前に)フックすることで動的にワーカー起動が可能となる。
def pytest_sessionstart(session):
tx = session.config.getoption('--tx')
if tx == ['hook']:
### start worker
tx[:] = ['ssh=worker']
Register as a new user and use Qiita more conveniently
Go to list of users who liked