Skip to content

Commit

Permalink
fix incorrect mypy based assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Jun 5, 2021
1 parent b8604de commit 628cd88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/_pytest/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ def __init__(
assert path is None
path = path_or_parent

assert parent is not None
path, fspath = _imply_path(path, fspath=fspath)
if name is None:
name = path.name
Expand All @@ -580,7 +579,9 @@ def __init__(
name = name.replace(os.sep, SEP)
self.path = path

session = session or parent.session
if session is None:
assert parent is not None
session = parent.session

if nodeid is None:
try:
Expand Down

0 comments on commit 628cd88

Please sign in to comment.