@pytest.fixture(params=(('', 'exec=True'), ('', '| bash -x'), ('document=', 'exec=True'), ('document=', '| bash -x')), ids=('stack_load_exec', 'stack_load_bash', 'stack_load_document_exec', 'stack_load_document_bash'))
def stack_load(request, host):
    'This fixture is used to run `stack load` on the host during integration tests.\n\n\tThere are 4 essentially equivalent ways of loading and running a dump.json. Using\n\tthis test fixture ensures that all 4 are tested. I.E:\n\n\tstack load dump_file exec=True\n\tstack load document=dump_file exec=True\n\tstack load dump_file | bash -x\n\tstack load document=dump_file | bash -x\n\t'
    (param_string, exec_string) = request.param

    def _load(dump_file, **kwargs):
        if ('exec' in kwargs):
            raise ValueError('Cannot pass exec param to this fixture. It handles it for you.')
        if ('document' in kwargs):
            raise ValueError('Cannot pass document param to this fixture. It handles it for you.')
        kwargs_string = ' '.join((f'{key}={value}' for (key, value) in kwargs.items()))
        return host.run(f'stack load {param_string}{dump_file} {exec_string} {kwargs_string}')
    return _load
This fixture is used to run `stack load` on the host during integration tests.

There are 4 essentially equivalent ways of loading and running a dump.json. Using
this test fixture ensures that all 4 are tested. I.E:

stack load dump_file exec=True
stack load document=dump_file exec=True
stack load dump_file | bash -x
stack load document=dump_file | bash -x
@pytest.fixture(params=((, 'exec=True'), (, '| bash -x'), ('document=', 'exec=True'), ('document=', '| bash -x')), ids=('stack_load_exec', 'stack_load_bash', 'stack_load_document_exec', 'stack_load_document_bash'))
def stack_load(request, host):
    'This fixture is used to run `stack load` on the host during integration tests.\n\n\tThere are 4 essentially equivalent ways of loading and running a dump.json. Using\n\tthis test fixture ensures that all 4 are tested. I.E:\n\n\tstack load dump_file exec=True\n\tstack load document=dump_file exec=True\n\tstack load dump_file | bash -x\n\tstack load document=dump_file | bash -x\n\t'
    (param_string, exec_string) = request.param

    def _load(dump_file, **kwargs):
        if ('exec' in kwargs):
            raise ValueError('Cannot pass exec param to this fixture. It handles it for you.')
        if ('document' in kwargs):
            raise ValueError('Cannot pass document param to this fixture. It handles it for you.')
        kwargs_string = ' '.join((f'{key}={value}' for (key, value) in kwargs.items()))
        return host.run(f'stack load {param_string}{dump_file} {exec_string} {kwargs_string}')
    return _load