tests: Cram to Prysk#2003
Draft
joverlee521 wants to merge 7 commits into
Draft
Conversation
This commit switches our Cram tests to Prysk, which is a fork of the Cram project. Prysk has a pytest plugin to run the tests as part of pytest. This opens the way to use pytest-xdist to run tests in parallel. All tests pass when running `prysk` directly, but there are errors when running prysk with pytest. Those errors will be fixed in the following commit.
pytest-xdist is a plugin that extends pytest to distribute tests across multiple CPUs to speed up test execution.
Switches pytest to run with all available cores. This includes the Prysk tests which are now run as part of pytest.
This fails in the pytest-prsyk runs because the temporary directory used by pytest does not include the `include-file.t` string. I'm not sure if it's worth looking into, but modifying this test for now to see if all tests pass in CI.
Since the pytest-xdist workers as randomly assigned, mixing the short running unit tests and the long running functional tests might result in an uneven spread of tests among workers. Run them separately so that the long running functional tests can be spread evenly.
run_tests.sh should just run Prysk tests with the pytest and partial tests with -k will automatically work.
591a914 to
197a131
Compare
66dc6f4 to
1076518
Compare
joverlee521
commented
May 19, 2026
| echo "Running cram tests without coverage" | ||
| echo "Running prysk tests without coverage" | ||
| export AUGUR="${{ github.workspace }}/bin/augur" | ||
| pytest --no-cov -n auto tests/functional/ |
Contributor
Author
There was a problem hiding this comment.
Huh, some tests (e.g.) are running slower because the auto-detect is only creating 2 workers instead of the expected 4. Not sure what's going on here...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
Demo of migrating from Cram to Prysk, which is the maintained fork of Cram.
Prysk has a pytest plugin that works with pytest-xdist to run tests in parallel without any custom code.
With this change, all tests are runnable with run_test.sh or pytest
Run subset of function tests with
-kRelated issue(s)
Alternative to #1995
Checklist
cramtoprysk(?)