Tweak comment
This commit is contained in:
parent
bb48b7529a
commit
0ac1c3750d
|
@ -925,11 +925,12 @@ class Session(nodes.Collector):
|
|||
# In case the file paths do not match, fallback to samefile() to
|
||||
# account for short-paths on Windows (#11895).
|
||||
same_file = os.path.samefile(node.path, matchparts[0])
|
||||
# we don't want to find links, so we at least
|
||||
# exclude symlinks to regular directories
|
||||
is_match = same_file and os.path.islink(
|
||||
node.path
|
||||
) == os.path.islink(matchparts[0])
|
||||
# We don't want to match links to the current node,
|
||||
# otherwise we would match the same file more than once (#12039).
|
||||
is_match = same_file and (
|
||||
os.path.islink(node.path)
|
||||
== os.path.islink(matchparts[0])
|
||||
)
|
||||
|
||||
# Name part e.g. `TestIt` in `/a/b/test_file.py::TestIt::test_it`.
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue