Skip to content

run the test suite as part of the nix build - #477

Draft
PhilTaken wants to merge 5 commits into
mainfrom
phil/nix-build-with-checks
Draft

run the test suite as part of the nix build#477
PhilTaken wants to merge 5 commits into
mainfrom
phil/nix-build-with-checks

Conversation

@PhilTaken

@PhilTaken PhilTaken commented Oct 18, 2024

Copy link
Copy Markdown
Member

can be used for ci / local dev setups since e.g. git calls in the test suite are not properly isolated from the host system

@PhilTaken
PhilTaken requested a review from elikoga October 18, 2024 11:16
@PhilTaken PhilTaken self-assigned this Oct 18, 2024
@PhilTaken
PhilTaken requested a review from zagy as a code owner October 18, 2024 11:16
@PhilTaken
PhilTaken requested a review from Ma27 October 18, 2024 11:17
@PhilTaken

Copy link
Copy Markdown
Member Author

ah this'll need an extra iteration since tox tries to install the deps and github ci is sandboxed properly

@PhilTaken
PhilTaken marked this pull request as draft October 18, 2024 11:30
@elikoga

elikoga commented Oct 18, 2024

Copy link
Copy Markdown
Member

You could think about running the test suite by yourself without using tox to invoke multiple python versions maybe?

@PhilTaken

PhilTaken commented Oct 22, 2024

Copy link
Copy Markdown
Member Author

You could think about running the test suite by yourself without using tox to invoke multiple python versions maybe?

theres is a pytestcheckhook provided by nixpkgs, unfortunately there appears to be a priority clash in PYTHONPATH between a vendored py.py in pytest and pylib where the former is imported first in the test suite

I'll look into how the priority is being handled here

Due to the way the PYTHONPATH is constructed in the buildPythonPackage builder, pylib was
shadowed by Pytest's vendored pylib which however did not include all of pylib's modules.

Inserting pylib right at the beginning of PYTHONPATH resolves that issue
@PhilTaken

Copy link
Copy Markdown
Member Author

inserting another pylib into PYTHONPATH before pytest is not a great but acceptable solution for the tests. at least it's in a workable state now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants