Skip to content

Commit 329f56e

Browse files
committed
Fix incorrect result of getmodpath method.
1 parent 3a668ea commit 329f56e

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ Virgil Dupras
261261
Vitaly Lashmanov
262262
Vlad Dragos
263263
Volodymyr Piskun
264+
Wei Lin
264265
Wil Cooley
265266
William Lee
266267
Wim Glenn

changelog/6189.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix incorrect result of ``getmodpath`` method.

src/_pytest/python.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ def getmodpath(self, stopatmodule=True, includemodule=False):
285285
break
286286
parts.append(name)
287287
parts.reverse()
288-
s = ".".join(parts)
289-
return s.replace(".[", "[")
288+
return ".".join(parts)
290289

291290
def reportinfo(self):
292291
# XXX caching?

0 commit comments

Comments
 (0)