From eb40f6f892b0fd8eb81e3f1a40dcc3205f8eaf93 Mon Sep 17 00:00:00 2001 From: Vincent Philippon Date: Wed, 22 Nov 2017 23:15:18 -0500 Subject: [PATCH] Test confirming that deep extras resolves works --- tests/test_pipenv.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 5127bd89..06956ae2 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -843,6 +843,29 @@ requests = "*" c = p.pipenv('install') assert c.return_code == 0 + @pytest.mark.extras + @pytest.mark.lock + @pytest.mark.requirements + @pytest.mark.complex + def test_complex_lock_deep_extras(self): + # records[pandas] requires tablib[pandas] which requires pandas. + + with PipenvInstance() as p: + with open(p.pipfile_path, 'w') as f: + contents = """ +[packages] +records = {extras = ["pandas"], version = "==0.5.2"} + """.strip() + f.write(contents) + + c = p.pipenv('lock') + assert c.return_code == 0 + assert 'tablib' in p.lockfile['default'] + assert 'pandas' in p.lockfile['default'] + + c = p.pipenv('install') + assert c.return_code == 0 + @pytest.mark.lock @pytest.mark.deploy def test_deploy_works(self):