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
Thanks for providing this plugin, it looks really useful.
I'm trying to use it in an async project and getting an error which I've pinned down to the combination of this plugin and pytest-asyncio. I admittedly don't know which plugin might need to change here, though given the popularity of async code 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 =============================
OK, I see that the same problem doesn't show when one runs the default doctest, but practically all narrative docs documentation in e.g. astroquery raises a similar namespace error, e.g. one of them
_______________________________________ ERROR collecting docs/xmatch/xmatch.rst ________________________________________
import file mismatch:
imported module 'xmatch' has this __file__ attribute:
None
which is not the same as the test file we want to collect:
/Users/bsipocz/munka/devel/astroquery/docs/xmatch/xmatch.rst
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 87 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================== 87 errors in 1.15s ==================================================
Thanks for providing this plugin, it looks really useful.
I'm trying to use it in an async project and getting an error which I've pinned down to the combination of this plugin and
pytest-asyncio
. I admittedly don't know which plugin might need to change here, though given the popularity of async code it would be great if the two worked together.Reproduce
Create a
README.md
containing:Then run:
Cross reference: pytest-dev/pytest-asyncio#872
The text was updated successfully, but these errors were encountered: