Skip to content

Commit

Permalink
Fix a pytest path mangling bug. (#4565)
Browse files Browse the repository at this point in the history
Restores the ability to see the entire test location (including
class and method) when running in verbose mode.
  • Loading branch information
benjyw committed May 9, 2017
1 parent 6fc1193 commit 107cbff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/python/pants/backend/python/tasks2/pytest_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def pytest_runtest_protocol(item, nextitem):
real_nodeid = item.nodeid
real_path = real_nodeid.split('::', 1)[0]
fixed_path = _SOURCES_MAP.get(real_path, real_path)
fixed_nodeid = fixed_path + real_path[len(real_path):]
fixed_nodeid = fixed_path + real_nodeid[len(real_path):]
try:
item._nodeid = fixed_nodeid
yield
Expand Down

0 comments on commit 107cbff

Please sign in to comment.