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

Running 'hatch test' command, default matrix does not respect 'requires-python' #1571

Open
hobbsd opened this issue Jun 14, 2024 Discussed in #1568 · 2 comments
Open

Running 'hatch test' command, default matrix does not respect 'requires-python' #1571

hobbsd opened this issue Jun 14, 2024 Discussed in #1568 · 2 comments

Comments

@hobbsd
Copy link

hobbsd commented Jun 14, 2024

Discussed in #1568

I have one project with requires-python = ">=3.8", and running hatch test works — the project gets installed in the 'hatch-test.py3.11' environment, so the imports within my test modules work.

A second project has requires-python = ">=3.12", and running hatch test doesn't create a new 'hatch-test.py3.12' environment and install the project in it, so the tests error out.

I thought changing requires-python to ">=3.11" in the second project might make hatch test go ahead and install the project in the existing 3.11 hatch-test environment, but it didn't. But running hatch test -py 3.12 created a new 3.12 test environment and worked.

@ofek
Copy link
Sponsor Collaborator

ofek commented Jun 14, 2024

Thank you, I will fix this!

@hobbsd
Copy link
Author

hobbsd commented Jun 14, 2024

Thank you for hatch — I'm into it!

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

No branches or pull requests

2 participants