-
Notifications
You must be signed in to change notification settings - Fork 58
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
specifying explicit dependency of a test case on a file #12
Comments
See one of the use cases: #49 |
I assumed it's not a duplicate of #49, because in #49 I want to dynamically add that dependency (when a test retrieves some data through a specific ORM class), and here it's about setting it statically for each test. But now I'm thinking having a hook for "add dependency on file X to currently running test" would work too, for both the test decorator and my use case. |
I think something like this would be helpful for me too. Providing a programmatic way to:
Cause then I can write logic in my conftest to decide when to mark the test to be run. For example:
I have some usecases where this could be helpful for me. Case1: Depending on resource files (#178) Case 2: With |
This would be useful to me as well. The use case is an integration test where there's a 1-1 mapping between module/file and test, but Coverage can't trace it since the module is executed as a subprocess. |
This would be needed for data files or other files which influence the execution of tests but don't contain normal python lines of code.
One option how to specify the dependency of a test would be to preceed them with a decorator.
Another possible option would be a pragma option.
testmon has to merge this explicit information to the dependency data acquired from coverage.py
In the first phase the granularity of a whole file would need to suffice. Whenever the file modify time changes, dependent tests would be re-executed.
The text was updated successfully, but these errors were encountered: