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
This won't work, I'm afraid. The problem is that I need to record the outcome of test_a so that the dependency marker for test_b can check this result and decide whether to skip or not to skip test_b. The marker does just this: recording the outcome of the respective test in the internal structures of pytest-dependency. So I need it also on test_a.
Sorry, my last comment was wrong. It could be implemented as you suggest.
However, I don't like this behavior to be the default. I'd prefer to have the dependencies explicitly be marked. Furthermore, this behavior would mean that internal data structures of pytest get modified even for packages that don't even use pytest-dependency, if only pytest-dependency is installed.
I will rather add a configuration switch automark_dependency to be set in the ini file. If set to False, the default, the current behavior will be retained, e.g. dependencies will need to be marked explicitly. If set to True, it will have the same effect as if all test are implicitly decorated with @pytest.mark.dependency().
RKrahl
changed the title
Avoid marking dependencies
Add a configuration switch to automatically mark all tests
Nov 27, 2017
The current documentation describe this usecase:
It would be great to avoid marking
test_a
:What do you think?
The text was updated successfully, but these errors were encountered: