From ace0c1653121770a58ae3cccf9059227702edde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Sat, 28 Mar 2020 19:24:20 +0100 Subject: [PATCH] fix test_entrypoints_work test Since we now build in place, pip install calls setup.py in place which in turn creates fake_pkg.egg-info. Since in this test the package we are installing is in script.temp_path, we must tell script to expect temporary files to be created. --- tests/functional/test_cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/functional/test_cli.py b/tests/functional/test_cli.py index e416315125f..c401a7cf80f 100644 --- a/tests/functional/test_cli.py +++ b/tests/functional/test_cli.py @@ -27,7 +27,9 @@ def test_entrypoints_work(entrypoint, script): ) """.format(entrypoint))) - script.pip("install", "-vvv", str(fake_pkg)) + # expect_temp=True, because pip install calls setup.py which + # in turn creates fake_pkg.egg-info. + script.pip("install", "-vvv", str(fake_pkg), expect_temp=True) result = script.pip("-V") result2 = script.run("fake_pip", "-V", allow_stderr_warning=True) assert result.stdout == result2.stdout