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

Configuration of a custom test runner? #1822

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

Configuration of a custom test runner? #1822

sumpfralle opened this issue Nov 24, 2024 · 0 comments

Comments

@sumpfralle
Copy link

The hatch documentation describes how to configure custom commands for using an alternative test runner (e.g. unittest).

But the hatch test command seems to be tightly coupled with pytest, due to hatch applying pytest-specific arguments (e.g. -p no:randomly). This breaks custom runners, since they do not understand these arguments.

Currently I work around this issue by adding ramdonize = true to my pyproject.toml. This prevents hatch from adding the above argument (which is understood only by pytest). But oviously this is just a fragile hack.

I would appreciate, if I could disable any pytest-specific argument injection via configuration.

Do you think, that it is within the scope of hatch to configure a custom test runner?
(similar to the way custom formatters and linters can be configured within hatch)

Do you have an idea, how you would implement this? (maybe I could provide a PR)

Thanks for your time!

@sumpfralle sumpfralle changed the title Configuration or a custom test runner? Configuration of a custom test runner? 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