Tests are installed directly in site-packages
$ python3 -m venv _e
$ . _e/bin/activate
(_e) $ pip install tcx2gpx
Collecting tcx2gpx
Downloading tcx2gpx-0.1.4-py3-none-any.whl (17 kB)
[…]
(_e) $ ls -l _e/lib/python*/site-packages/tests/
total 0
-rw-r--r--. 1 ben ben 0 Feb 22 08:56 __init__.py
drwxr-xr-x. 1 ben ben 48 Feb 22 08:56 __pycache__
drwxr-xr-x. 1 ben ben 96 Feb 22 08:56 tcx2gpx
This can obviously create conflicts and confusion, especially in system-wide installations (e.g. via Linux distribution packages).
As shown in https://setuptools.pypa.io/en/latest/userguide/declarative_config.html, I think the correct solution will be to add
[options.packages.find]
exclude =
tests*
to setup.cfg
.