Fix testprocess test for custom environment

This commit is contained in:
Florian Bruhin 2016-08-10 14:02:04 +02:00
parent f6d4e0d32c
commit a35b6e2279

View File

@ -159,12 +159,12 @@ def test_custom_environment(pyproc):
@pytest.mark.posix @pytest.mark.posix
def test_custom_environment_no_system(monkeypatch, pyproc): def test_custom_environment_system_env(monkeypatch, pyproc):
"""When env=... is given, no system environment should be present.""" """When env=... is given, the system environment should be present."""
monkeypatch.setenv('QUTE_TEST_ENV', 'blah') monkeypatch.setenv('QUTE_TEST_ENV', 'blubb')
pyproc.code = 'import os; print(os.environ.get("QUTE_TEST_ENV", "None"))' pyproc.code = 'import os; print(os.environ["QUTE_TEST_ENV"])'
pyproc.start(env={}) pyproc.start(env={})
pyproc.wait_for(data='None') pyproc.wait_for(data='blubb')
class TestWaitFor: class TestWaitFor: