From a3d3ec042d38195392841a9112911c2bde3587d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 30 Dec 2022 16:26:30 -0800 Subject: Show installed packages after setup in CI envs (#2794) Resolves https://github.com/tox-dev/tox/issues/2685 --- tests/tox_env/python/test_python_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/tox_env/python/test_python_api.py') diff --git a/tests/tox_env/python/test_python_api.py b/tests/tox_env/python/test_python_api.py index 6d8f2c80..90e2ab65 100644 --- a/tests/tox_env/python/test_python_api.py +++ b/tests/tox_env/python/test_python_api.py @@ -179,3 +179,13 @@ def test_python_set_hash_seed_incorrect(tox_project: ToxProjectCreator) -> None: result = tox_project({"tox.ini": ""}).run("r", "-e", "py", "--hashseed", "ok") result.assert_failed(2) assert "tox run: error: argument --hashseed: invalid literal for int() with base 10: 'ok'" in result.err + + +@pytest.mark.parametrize("in_ci", [True, False]) +def test_list_installed_deps(in_ci: bool, tox_project: ToxProjectCreator, mocker: MockerFixture) -> None: + mocker.patch("tox.tox_env.python.api.is_ci", return_value=in_ci) + result = tox_project({"tox.ini": "[testenv]\nskip_install = true"}).run("r", "-e", "py") + if in_ci: + assert "py: pip==" in result.out + else: + assert "py: pip==" not in result.out -- cgit v1.2.1