Skip to content

Python: run tests in separate derivation #26400

@FRidh

Description

@FRidh

Issue description

Currently we run tests directly after a package has been build. Unfortunately, we need to disable tests regularly to avoid circular dependencies caused by test dependencies.

Running tests in a separate derivation would:

  • allow us to test all packages because circular dependencies are no longer a issue;
  • reduce build time of the actual packages because tests are ran outside of them;
  • add a bit of overhead because there's now two derivations per package;
  • allow actual integration testing, because we would build a new env in which we perform the testing.

I propose we then add a tested attribute to Python packages that corresponds to the second derivation. This is typically the attribute to use for CI as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancementAdd something new or improve an existing system.2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: pythonPython is a high-level, general-purpose programming language.6.topic: testingTooling for automated testing of packages and modules9.needs: community feedbackThis needs feedback from more community members.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions