Skip to content

Conversation

@stefanv
Copy link
Member

@stefanv stefanv commented Nov 8, 2024

This should allow us to move forward with numpy/numpy#27371 without breaking behavior for src/tests layout.

- When `./tests` is present, try to test that instead of packagename
- If src layout is used, there's no need to switch away from the source directory when testing
- No longer use import-mode=importlib, which meant that packages could not do
  relative imports in tests
@stefanv stefanv added the type: Bug fix Something isn't working label Nov 9, 2024
@stefanv stefanv force-pushed the improve-src-test-discovery branch from 3aa0a00 to 7303f9d Compare November 9, 2024 02:00
@ngoldbaum
Copy link
Contributor

Thanks so much for working on this! Let me know if you need anything from me on the NumPy side of things to get this in and update NumPy's CI to spin 0.13 afterwards.

@stefanv stefanv merged commit 3760320 into scientific-python:main Nov 12, 2024
@jarrodmillman jarrodmillman added this to the 0.13 milestone Nov 12, 2024
stefanv added a commit that referenced this pull request Nov 12, 2024
- When `./tests` is present, try to test that instead of packagename
- If src layout is used, there's no need to switch away from the source directory when testing
- No longer use import-mode=importlib, which meant that packages could not do
  relative imports in tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: Bug fix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants