From 60c0be146040b320d3e1c0ff8c6e2f8513a8c67b Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Sat, 24 Feb 2018 19:49:03 +0900 Subject: tests/integration/shell.py: TESTING TESTING ONE TWO THREEEEEE --- tests/integration/shell.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/integration/shell.py') diff --git a/tests/integration/shell.py b/tests/integration/shell.py index 341ad7e3d..3b42e4ea0 100644 --- a/tests/integration/shell.py +++ b/tests/integration/shell.py @@ -75,6 +75,21 @@ def test_inherit(cli, tmpdir, datafiles, animal): assert result.output == expected +# Test host environment variable inheritance +@pytest.mark.parametrize("animal", [("Horse"), ("Pony")]) +@pytest.mark.datafiles(DATA_DIR) +def test_inherit_again(cli, tmpdir, datafiles, animal): + project = os.path.join(datafiles.dirname, datafiles.basename) + + # Set the env var, and expect the same with added newline + os.environ['ANIMAL'] = animal + expected = animal + '\n' + + result = execute_shell(cli, project, ['echo', '${ANIMAL}']) + assert result.exit_code == 0 + assert result.output == expected + + # Test running an executable in a runtime with no shell (i.e., no # /bin/sh) @pytest.mark.datafiles(DATA_DIR) -- cgit v1.2.1