Skip to content

Better testing isolation #1428

Open
Open
@di

Description

@di

In #1425 it was discovered that a test was failing due to a configuration file in the user's home directory. Some tests also populate the global scope and fail the second time they are run.

By using pytest's tmpdir fixture and setting some environmental variables, it should be possible to improve the isolation of tests (at the expense of adding a bit more runtime to the test suite).

An example of how it's done from the pip test suite: https://github.com/pypa/pip/blob/db127330d4e071c84c5e1c107f60f8229e7d68ce/tests/conftest.py#L79-L148

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions