You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
sumpfralle
changed the title
Configuration or a custom test runner?
Configuration of a custom test runner?
Nov 24, 2024
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 withpytest
, 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 mypyproject.toml
. This preventshatch
from adding the above argument (which is understood only bypytest
). 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!
The text was updated successfully, but these errors were encountered: