Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ships tests in top-level 'tests' directory #103

Closed
llimeht opened this issue Apr 25, 2023 · 2 comments · Fixed by #105
Closed

Ships tests in top-level 'tests' directory #103

llimeht opened this issue Apr 25, 2023 · 2 comments · Fixed by #105

Comments

@llimeht
Copy link

llimeht commented Apr 25, 2023

The orsopy module installs its tests into a top-level tests directory. This will conflict with any other module that also (accidentally) installs its tests into that location. There is frequent debate about whether or not to install tests but that is not the issue here; it is the location of the installed tests that is the concern.

$ python3 setup.py bdist_wheel
...
$ unzip -l dist/orsopy-1.1.0-py2.py3-none-any.whl 
Archive:  dist/orsopy-1.1.0-py2.py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
       59  2023-04-24 00:48   orsopy/__init__.py
...
     1016  2023-04-24 00:48   orsopy/utils/resolver_slddb.py
       36  2023-04-24 00:48   tests/__init__.py
       36  2023-04-24 00:48   tests/not_orso.ort
     2687  2023-04-24 00:48   tests/test_example.ort
...
$ pip install --user .
$ ls ~/.local/lib/python3.11/site-packages/orsopy
dataclasses.py  fileio/  __init__.py  __pycache__/  slddb/  utils/
 ls ~/.local/lib/python3.11/site-packages/tests/
__init__.py  not_orso.ort  __pycache__/  test_example2.ort  test_example.ort  test_fileio/  test_slddb/

(tested with setuptools v 66.1.1 and this is a moving target; it might also be another example of pypa/setuptools#3260)

@arm61
Copy link
Contributor

arm61 commented Apr 26, 2023

Interesting, we used the python package cookie-cutter to set all of the infrastructure up. I am happy to move the tests into the orsopy directory if no one else is opposed.

@andyfaff
Copy link
Contributor

I think we need to move the tests for a conda forge recipe anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants