Skip to content

Ability to make a noop fixture optionally dependant on proc fixture #890

@fizyk

Description

@fizyk

The goal is to provide an additional layer between process and client that would allow to provide additional, common data fixtures that would be available only for a subset of tests, not all of them.

The simplest way would be to make noop fixture optionally dependent on the process fixture.

from pytest_postgresql import factories

postgresql_my_proc = factories.postgresql_proc()
postgresql_additional = factories.postgresql_noproc(dbname="subset_of_heavy_tests", optional_proc="postgresql_my_proc", load=[Path("/path/to/heavy.sql")])
postgresql_heavy_subset = factories.postgresql('postgresql_additional')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions