Skip to content

Fixture editsdefaults is broken #872

Description

@henklaak
@pytest.fixture(scope="function")
def editsdefaults():
    restore = control.config.defaults.copy()
    yield
    control.config.defaults = restore.copy()

The fixture replaces the global config.config.defaults with a copy after the yield.
Other modules that have already imported control.config.defaults will still have their original reference.

A proper restore should replace all items in dictionary separately instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions