3.0.0 sdist is missing tests/__init__.py
Closed this issue · 6 comments
mgorny commented
When attempting to run the test suite from 3.0.0 sdist, I'm getting errors such as the following:
______________________________________________ ERROR collecting tests/test_commonmark.py ______________________________________________
ImportError while importing test module '/tmp/mistune-3.0.0/tests/test_commonmark.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_commonmark.py:2: in <module>
from tests import BaseTestCase, normalize_html
E ImportError: cannot import name 'BaseTestCase' from 'tests' (unknown location)
It seems that tests/__init__.py
file is missing from the sdist for some reason.
lepture commented
How do you run the test with sdist? May I know the command? So, basically, if I put a __init__.py
file in tests would fix the problem. Is it correct?
mgorny commented
Roughly, python -m pytest
. The file was included in 2.0.5 but somehow disappeared in 3.0.0. From a quick glance, tests/fixtures
are missing too.
mgorny commented
I'll make a pull request in a minute.
mgorny commented
Are you planned to make another release soon or should we workaround this on our end?
lepture commented
I'll make a release soon.
mgorny commented
Thank you. I can confirm that 3.0.1 worked!