MrDogeBro / sphinx_rtd_dark_mode

Adds a toggleable dark mode to the Read the Docs theme for Sphinx.
sphinx-rtd-dark-mode.vercel.app
MIT License
49 stars 15 forks source link

Extraneous Tests Folder #25

Closed brolewis closed 3 years ago

brolewis commented 3 years ago

The library is creating a top-level folder called tests in site-packages:

__pycache__/
_distutils_hack/
alabaster/
alabaster-0.7.12.dist-info/
babel/
Babel-2.9.1.dist-info/
certifi/
certifi-2021.5.30.dist-info/
charset_normalizer/
charset_normalizer-2.0.4.dist-info/
distutils-precedence.pth
docutils/
docutils-0.16.dist-info/
idna/
idna-3.2.dist-info/
imagesize-1.2.0.dist-info/
imagesize.py
jinja2/
Jinja2-3.0.1.dist-info/
markupsafe/
MarkupSafe-2.0.1.dist-info/
packaging/
packaging-21.0.dist-info/
pip/
pip-21.1.3.dist-info/
pkg_resources/
pygments/
Pygments-2.9.0.dist-info/
pyparsing-2.4.7.dist-info/
pyparsing.py
pytz/
pytz-2021.1.dist-info/
requests/
requests-2.26.0.dist-info/
setuptools/
setuptools-57.0.0.dist-info/
snowballstemmer/
snowballstemmer-2.1.0.dist-info/
sphinx/
Sphinx-4.1.2.dist-info/
sphinx_rtd_dark_mode/
sphinx_rtd_dark_mode-1.2.3.dist-info/
sphinx_rtd_theme/
sphinx_rtd_theme-0.5.2.dist-info/
sphinxcontrib/
sphinxcontrib_applehelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_applehelp-1.0.2.dist-info/
sphinxcontrib_devhelp-1.0.2-py3.8-nspkg.pth
sphinxcontrib_devhelp-1.0.2.dist-info/
sphinxcontrib_htmlhelp-2.0.0-py3.9-nspkg.pth
sphinxcontrib_htmlhelp-2.0.0.dist-info/
sphinxcontrib_jsmath-1.0.1-py3.7-nspkg.pth
sphinxcontrib_jsmath-1.0.1.dist-info/
sphinxcontrib_qthelp-1.0.3-py3.8-nspkg.pth
sphinxcontrib_qthelp-1.0.3.dist-info/
sphinxcontrib_serializinghtml-1.1.5-py3.9-nspkg.pth
sphinxcontrib_serializinghtml-1.1.5.dist-info/
tests/
urllib3/
urllib3-1.26.6.dist-info/

The reason this is a problem is that this tests package being installed in my venv clobbers the local tests dir within my app, preventing the app from importing from within that directory structure (i.e. import tests.test_utils now give me a ModuleNotFoundError because the import system is looking within $VIRTUAL_ENV/lib/python3.9/site-packages/tests/ rather than (repo root)/tests and not finding my test_utils module).

MrDogeBro commented 3 years ago

Thanks for the report. Didn't realize this was happening so thanks for bringing it to my attention. I will patch this shortly.