Ape hijacks pytest, not allowing pytest to be used independently or pytest-xdit to be used
See original GitHub issueEnvironment information
Ape version was beta 0.1.3 and this issue surfaced before plug-in installation.
- Python Version: 3.8
- OS: macOS
I’m using poetry with ape as a dev dependency.
What went wrong?
When I run poetry run pytest ape reports “no provider name test”
After that I switched to running poetry run ape test
, which worked fine as a replacement.
However, recently started using pytest-xdist
for test parallelization and when running poetry run ape test -n auto
, the same error occurs. Had to uninstall ape to be able to test directly with pytest.
How can it be fixed?
Fill this in if you have ideas on how the bug could be fixed.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Usage and Invocations — pytest documentation
This will run tests which contain names that match the given string expression (case-insensitive), which can include Python operators that use filenames, ...
Read more >How to use skip and xfail to deal with tests that cannot succeed
A skip means that you expect your test to pass only if some conditions are met, otherwise pytest should skip running the test...
Read more >How to use unittest-based tests with pytest
pytest supports running Python unittest -based tests out of the box. It's meant for leveraging existing unittest -based test suites to use pytest...
Read more >Parametrizing tests — pytest documentation
In test_timedistance_v3 , we used pytest.param to specify the test IDs together with the actual data, instead of listing them separately.
Read more >Changing standard (Python) test discovery - Pytest
The --ignore-glob option allows to ignore test file paths based on Unix ... To collect duplicate tests, use the --keep-duplicates option on the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @unparalleled-js - I did this on a non-ape repo:
Can confirm it works now, which didn’t work on main.
I don’t understand why ape is still installed in a new environment; that must be related to conda?. For now, to turn off the ape-test pytest plugin, you either have to use ape in separate environment or use the
-p no:ape_test
option when invoking pytest.https://stackoverflow.com/questions/37924489/how-to-disable-pytest-plugins-for-single-tests