fix sys.path for local workers Fixes #421
This commit is contained in:
@@ -234,7 +234,7 @@ def test_remote_env_vars(testdir):
|
||||
|
||||
|
||||
def test_remote_inner_argv(testdir):
|
||||
"""Test/document the behavior due to execnet using `python -c`."""
|
||||
"""Work around sys.path differences due to execnet using `python -c`."""
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
import sys
|
||||
@@ -292,3 +292,17 @@ def test_remote_usage_prog(testdir, request):
|
||||
result = testdir.runpytest_subprocess("-n1")
|
||||
assert result.ret == 1
|
||||
result.stdout.fnmatch_lines(["*usage: *", "*error: my_usage_error"])
|
||||
|
||||
|
||||
def test_remote_sys_path(testdir):
|
||||
"""Test/document the behavior due to execnet using `python -c`."""
|
||||
testdir.makepyfile(
|
||||
"""
|
||||
import sys
|
||||
|
||||
def test_sys_path():
|
||||
assert "" not in sys.path
|
||||
"""
|
||||
)
|
||||
result = testdir.runpytest("-n1")
|
||||
assert result.ret == 0
|
||||
|
||||
Reference in New Issue
Block a user