Tests are installed as package
Currently, the tests are installed as own package and show up in the python environment if the package is installed with pip.
Maybe add
[tool.setuptools.packages.find]
exclude = ["docs", "tests*"]
to the pyrpoject.toml. Idk if this works.
Hmm, is this a common solution? is it a large issue that the tests are installed as well?
https://packaging.python.org/en/latest/tutorials/packaging-projects/
does not mention any special handling for test files.
Maybe this is also related to the following line:
[tool.setuptools.packages]
find = {}
i need to check whether we still need this.
Hmm, is this a common solution? is it a large issue that the tests are installed as well?
https://packaging.python.org/en/latest/tutorials/packaging-projects/
does not mention any special handling for test files.
I think, test might not have a __init__.py file in other packages. If so, they are detected as package. I saw this in other projects:
[tool.setuptools]
packages = ["package_name_1", "package_name_2"]
Ah maybe this is even fixed by moving to src/ layout. I think the __init__.py in the src folder is not required.
I just checked the venv folder for an install and I do not see the tests anymore, so this should be fine now.