Skip to content

pytest-django and parallel testing issues with database #90

@bendavis78

Description

@bendavis78

I'm using the pytest runner, and am using pytest-django. I also have pytest-xdist installed, which allows me to pass -n to run tests in parallel:

$ /usr/local/bin/py.test -n 32 my_project/tests/

The -n param tells pytest-django to create separate databases for each test, each ending in _gw0, _gw1, etc. for each process.

However, when I run neotest with the pytest runner, all tests use the same database, which leads to conflicting states in tests.

Is there a way to run neotest-python tests such that each test uses its own database?

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