You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm hitting an issue using pytest-asyncio alongside pytest-doctestplus, a plugin for detecting tests in documentation. I admittedly don't know which plugin might need to change here, though given the popularity of doctests it would be great if the two worked together.
$ pip install pytest-asyncio pytest-doctestplus...
$ pytest --doctest-plus --doctest-glob '*.md'=========================== test session starts ============================platform linux -- Python 3.10.12, pytest-8.2.2, pluggy-1.5.0rootdir: /tmp/beesplugins: doctestplus-1.2.1, asyncio-0.23.7asyncio: mode=strictcollected 0 items / 1 error ================================== ERRORS ==================================________________________ ERROR collecting README.md ________________________ImportError while importing test module '/tmp/bees/README.md'.Hint: make sure your test modules/packages have valid Python names.Traceback:/usr/lib/python3.10/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level)E ModuleNotFoundError: No module named 'README'========================= short test summary info ==========================ERROR README.md!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!============================= 1 error in 0.20s =============================
We certainly customised the collector, but not as a subclass, so it all could be the source of the problem. As I see there is certainly more care put in the API docs collection than in the narrative docs files, so I'll try a few things this week to see if we have an easy fix for this.
I'm hitting an issue using
pytest-asyncio
alongsidepytest-doctestplus
, a plugin for detecting tests in documentation. I admittedly don't know which plugin might need to change here, though given the popularity of doctests it would be great if the two worked together.Reproduce
Create a
README.md
containing:Then run:
Cross reference: scientific-python/pytest-doctestplus#256
The text was updated successfully, but these errors were encountered: