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

test run with hatch test fails for lack of dependency that is included in pyproject.toml #1823

Open
ajprax opened this issue Nov 24, 2024 · 0 comments

Comments

@ajprax
Copy link

ajprax commented Nov 24, 2024

I'm working on a library that includes some optional dependencies. At test time, these dependencies are required to test the optional code.

I have the dependencies included in pyproject.toml thusly:

[tool.hatch.envs.test]
dependencies = ["crcmod", "tqdm", "watchdog"]

(crcmod and tqdm are optional dependencies of the library, watchdog is used in a simple test watcher)

If I run hatch env show I see the dependencies properly included in the test environment, and when I run hatch -e test run python I can import them, but when I run hatch test they fail with an import error.

To add further confusion, tqdm works properly, while crcmod (and numpy from further testing on another branch) both fail to import during tests. tqdm was the first added, but I haven't been able to find any other differences between how it and the others were added.

This branch has the issue.

@ajprax ajprax changed the title tests run with hatch test fails for lack of dependency that is included in pyproject.toml test run with hatch test fails for lack of dependency that is included in pyproject.toml Nov 24, 2024
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

1 participant