summaryrefslogtreecommitdiff
path: root/tests/tox_env/python/test_python_api.py
diff options
context:
space:
mode:
authorBernát Gábor <gaborjbernat@gmail.com>2022-12-30 16:26:30 -0800
committerGitHub <noreply@github.com>2022-12-30 16:26:30 -0800
commita3d3ec042d38195392841a9112911c2bde3587d1 (patch)
tree89b82d6ba36843b3f4280ee3ffd0155475f70e57 /tests/tox_env/python/test_python_api.py
parentd8c4cb0ffa1999b5d6466e0099dab76f242b1ba8 (diff)
downloadtox-git-a3d3ec042d38195392841a9112911c2bde3587d1.tar.gz
Show installed packages after setup in CI envs (#2794)
Resolves https://github.com/tox-dev/tox/issues/2685
Diffstat (limited to 'tests/tox_env/python/test_python_api.py')
-rw-r--r--tests/tox_env/python/test_python_api.py10
1 files changed, 10 insertions, 0 deletions
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