Skip to content

Export default setup/cleanup commands at base module level #120

@jenstroeger

Description

@jenstroeger

Hi, my feature request is related to merged PR #119. Basically I’m asking if you’d be ok to export more names at the main module level in __init__.py, for example:

__all__ = [
    ...
    "get_setup_command",
    "get_cleanup_command",
]

to gain access to the plugin’s default commands.

For context: these come in handy for setups like

@pytest.fixture(scope="session")
def docker_setup() -> str | list[str]:
    if os.getenv("GITHUB_ACTIONS") == "true":
        return []
    return pytest_docker.plugin.get_setup_command()  # return pytest_docker.get_setup_command()

so that I don’t need to reach into the plugin module. (See also #80.)

I can provide a PR again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions