From e4fb2d79e018226c67e3a0558a9354d976e9b7ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 29 Jul 2019 14:20:44 +0200 Subject: [PATCH] Test more X after Y situations --- tests/test_integration.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/test_integration.py b/tests/test_integration.py index 7588923..050c63f 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -149,6 +149,14 @@ def test_regular_after_current_is_not_supported(): assert "not supported" in result.stderr +def test_regular_after_first_deps_only_is_not_supported(): + result = tox("-e", NATIVE_TOXENV, "--print-deps-only") + assert result.stdout.splitlines()[0] == "six" + result = tox("-e", NATIVE_TOXENV, prune=False, check=False) + assert result.returncode > 0 + assert "not supported" in result.stderr + + def test_regular_recreate_after_current(): result = tox("-e", NATIVE_TOXENV, "--current-env") assert result.stdout.splitlines()[0] == NATIVE_EXECUTABLE @@ -184,13 +192,16 @@ def test_current_after_deps_only(): assert result.stdout.splitlines()[0] == NATIVE_EXECUTABLE -def test_regular_after_deps_only(): +def test_regular_recreate_after_deps_only(): result = tox("-e", NATIVE_TOXENV, "--print-deps-only") assert "bin/python" not in result.stdout assert "six" in result.stdout result = tox("-re", NATIVE_TOXENV, prune=False) assert result.stdout.splitlines()[0] != NATIVE_EXECUTABLE + sitelib = DOT_TOX / f"{NATIVE_TOXENV}/lib/python3.{NATIVE_TOXENV[-1]}/site-packages" + assert sitelib.is_dir() + assert len(list(sitelib.glob("test-*.dist-info"))) == 1 result = tox("-e", NATIVE_TOXENV, "--print-deps-only", prune=False) assert "bin/python" not in result.stdout