Why doesn't pytest use decorators for tests discovery and/or hooks? #10783
-
In the early days of jUnit, the way the framework discovered and executed tests was by classes named Pytest does exactly what jUnit did way ago... why hasn't pytest adopted an explicit way of discovering tests (using a decorator)? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Mostly backward compatibility reasons. Using decorators is supported by https://github.com/pytest-dev/pluggy, and |
Beta Was this translation helpful? Give feedback.
Mostly backward compatibility reasons. Using decorators is supported by https://github.com/pytest-dev/pluggy, and
tox
for example started adopting hooks using decorators directly, but for pytest we never discussed adopting decorators as there has no user demand, and adopting an alternative way of doing things is always extra work.