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

Move tests out of the package #1451

Closed
flying-sheep opened this issue Apr 8, 2024 · 0 comments · Fixed by #1459
Closed

Move tests out of the package #1451

flying-sheep opened this issue Apr 8, 2024 · 0 comments · Fixed by #1459

Comments

@flying-sheep
Copy link
Member

flying-sheep commented Apr 8, 2024

We currently have unit tests inside of the anndata package. We should separate them out following the recommended structure from Pytest (that we use in the scverse template).

Not having them separated also creates an issue with the src layout and --pyargs:

  1. We excise tests from the package during packaging using a exclude config

  2. this means that running tests on an editable install vs a regular install works differently:

    • In an editable install, pytest --pyargs anndata will run the unit tests inside of anndata/tests. ✅
    • In an editable install, pytest --pyargs anndata ./anndata/tests will run the unit tests twice
    • In a regular install, pytest --pyargs anndata will only run doctest since there are no unit tests in anndata/tests
    • In a regular install, pytest --pyargs anndata ./anndata/tests will run doctests and unit tests ✅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant