We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f695e18 commit 853b0a4Copy full SHA for 853b0a4
src/_pytest/nodes.py
@@ -210,9 +210,9 @@ def __init__(
210
self.session = parent.session
211
212
#: Filesystem path where this node was collected from (can be None).
213
- self.path = _imply_path_only(
214
- path or getattr(parent, "path", None), fspath=fspath
215
- )
+ if path is None and fspath is None:
+ path = getattr(parent, "path", None)
+ self.path = _imply_path_only(path, fspath=fspath)
216
217
# The explicit annotation is to avoid publicly exposing NodeKeywords.
218
#: Keywords/markers collected from all scopes.
0 commit comments