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
I find it rather impractical for large test suites to name both session and package scoped dependencies with the full node id. Wouldn't it be more logical to remove the path of that package from the name? From what I can understand, it is even redundant to name that dependency (in a package scope) including the full path.
I'll try to give an example, for the sake of clarity.
Feels like it already works but seems not documented here
Note that the references in session scope must use the full node id of the dependencies. This node id is composed of the module path, the name of the test class if applicable, and the name of the test, separated by a double colon “::”, see Section Names for details. References in module scope on the other hand must omit the module path in the node id, because that is implied by the scope.
pytest-dependency = "==0.5.1" if you look at code here pytest_dependency.DependencyManager.checkDepend you can notice that - manager checks by registered names in session scope which succeeded
I find it rather impractical for large test suites to name both session and package scoped dependencies with the full node id. Wouldn't it be more logical to remove the path of that package from the name? From what I can understand, it is even redundant to name that dependency (in a package scope) including the full path.
I'll try to give an example, for the sake of clarity.
Given a project structure somewhat like:
With tests:
and
It would seem more logical to me to be able to do this like:
Which in turn wouldn't cause any conflict with the following (if I'm not wrong):
I hope I have explained myself as clearly as possible and would appreciate any feedback.
Thanks in advance.
The text was updated successfully, but these errors were encountered: