Skip to content

Commit f7ecd72

Browse files
committed
pytester: runpytest_inprocess: print command/cwd
This brings it in line with what is done in `run` / `runpytest_subprocess`.
1 parent ec27363 commit f7ecd72

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

doc/5107.improvement.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``testdir.runpytest_inprocess`` now prints the command and current working
2+
directory, bringing it in line with
3+
``testdir.run`` / ``testdir.runpytest_subprocess``.

src/_pytest/pytester.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,8 @@ def runpytest_inprocess(self, *args, **kwargs) -> RunResult:
854854
"""
855855
syspathinsert = kwargs.pop("syspathinsert", False)
856856

857+
print("running (inline): pytest", *args)
858+
print(" in:", py.path.local())
857859
if syspathinsert:
858860
self.syspathinsert()
859861
now = time.time()

0 commit comments

Comments
 (0)