Comments (3)
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
.
from pytest-dependency.
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()
.
from pytest-dependency.
The switch would be a pretty good solution indeed!
from pytest-dependency.
Related Issues (20)
- Documentation request: pytest.mark.parametrize + brackets in dependency name HOT 2
- Test suite incompatibility with pytest 6.2 HOT 2
- Tests skipped on linux(3.6.13)(with no test failed) but executing on windows(3.6.10) HOT 3
- Dependency between two tests HOT 1
- session scope not working HOT 1
- Depends on all test methods in class HOT 1
- Conditional dependency on 2 tests HOT 2
- 0.5.1: pytest is failing HOT 4
- Is ordering on fixtures supported?
- only test_b is passed when install pytest-xdist with n>2.
- Not skipping a test when parent test skips or xfails
- The test was skipped,although the dependency test is success. HOT 5
- Dependency call is skipped by executing test with mark HOT 3
- pytest dependency not skipping the dependent tests when failed HOT 3
- when the dependency case use @pytest.mark.parametrize, depened cases was skipped,although the dependency test is success HOT 1
- is @pytest.mark.dependency() can be used for class level? like API test class depends on BVT test class...
- pyproject.toml missing
- Inheriting from test class with dependencies doesn't work correctly HOT 1
- Is pytest-dependency suppose to tell me why a test was skipped? I see nothing in the output explaining why. HOT 1
- Rerunning skipped cases when the parent test fails
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-dependency.