getmoto / py-partiql-parser

Python Parser for PartiQL
MIT License
7 stars 2 forks source link

`tests` gets installed as a Python module in `site-packages` #9

Closed Lef-F closed 1 year ago

Lef-F commented 1 year ago

Hi, I recently stumbled upon an issue when executing pylint against my tests.

Running pylint tests looks for tests Python modules in my local environment and then in the local path, which ends up testing your tests module instead of my local tests folder.

The workaround is to pass in an explicit path i.e. pylint $(pwd)/tests.

The question is: is it necessary for you that the tests module from py-partiql-parser gets installed in the user's virtual environment?

https://github.com/getmoto/py-partiql-parser/blob/1d9376e281fc46e170f4e34b62445e94c1686d6e/pyproject.toml#L17-L22

bblommers commented 1 year ago

Hey @Lef-F! No, that's not necessary at all. I just wanted to ensure that the tests-directory is included in the package, but I didn't think that the current approach would create separate modules.

We should probably just use MANIFEST.in to specify the additional directories.

bblommers commented 1 year ago

OK, this should be fixed with 0.3.7. The wheel only has the source files, the sdist has both source and test.

Thanks for raising this @Lef-F - just let us know if you run into any other issues.