Fix pytest tests invocation with custom PYTHONPATH
Fixes https://github.com/pytest-dev/pytest/issues/4913 Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
parent
51bf7c3aef
commit
d32ab6029f
|
@ -0,0 +1 @@
|
|||
Fix pytest tests invocation with custom ``PYTHONPATH``.
|
|
@ -2,6 +2,7 @@ from __future__ import absolute_import
|
|||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import os
|
||||
import pprint
|
||||
import sys
|
||||
import textwrap
|
||||
|
@ -1108,7 +1109,7 @@ def test_collect_pyargs_with_testpaths(testdir, monkeypatch):
|
|||
"""
|
||||
)
|
||||
)
|
||||
monkeypatch.setenv("PYTHONPATH", str(testdir.tmpdir))
|
||||
monkeypatch.setenv("PYTHONPATH", str(testdir.tmpdir), prepend=os.pathsep)
|
||||
with root.as_cwd():
|
||||
result = testdir.runpytest_subprocess()
|
||||
result.stdout.fnmatch_lines(["*1 passed in*"])
|
||||
|
|
Loading…
Reference in New Issue