From e7732e2a1be5d054a20341ddef1115f8549e94b2 Mon Sep 17 00:00:00 2001 From: Matt Davis <=> Date: Fri, 11 Mar 2022 01:49:16 -0500 Subject: [PATCH] Add test case for this. --- tests/integration/test_cli.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/integration/test_cli.py b/tests/integration/test_cli.py index b2184b1f..9aef70b1 100644 --- a/tests/integration/test_cli.py +++ b/tests/integration/test_cli.py @@ -210,6 +210,27 @@ pyver = "which python" assert 'which python' in c.stdout +@pytest.mark.cli +def test_scripts_resolve_dot_env_vars(PipenvInstance): + with PipenvInstance() as p: + with open(".env", "w") as f: + contents = """ +HELLO=WORLD + """.strip() + f.write(contents) + + with open(p.pipfile_path, "w") as f: + contents = """ +[scripts] +hello = "echo $HELLO" + """.strip() + f.write(contents) + c = p.pipenv('run hello') + print(c) + print(c.stdout) + assert 'WORLD' in c.stdout + + @pytest.mark.cli def test_help(PipenvInstance): with PipenvInstance() as p: