Merge pull request #2580 from andras-tim/fix-runpytest-subprocess
Avoid interactive pdb when pytest tests itself - fix #2023
This commit is contained in:
commit
2c2cf81d0a
|
@ -916,8 +916,11 @@ class Testdir:
|
|||
env['PYTHONPATH'] = os.pathsep.join(filter(None, [
|
||||
str(os.getcwd()), env.get('PYTHONPATH', '')]))
|
||||
kw['env'] = env
|
||||
return subprocess.Popen(cmdargs,
|
||||
stdout=stdout, stderr=stderr, **kw)
|
||||
|
||||
popen = subprocess.Popen(cmdargs, stdin=subprocess.PIPE, stdout=stdout, stderr=stderr, **kw)
|
||||
popen.stdin.close()
|
||||
|
||||
return popen
|
||||
|
||||
def run(self, *cmdargs):
|
||||
"""Run a command with arguments.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Set ``stdin`` to a closed ``PIPE`` in ``pytester.py.Testdir.popen()`` for avoid unwanted interactive ``pdb``
|
Loading…
Reference in New Issue