1
0
mirror of https://github.com/fedora-python/tox-current-env.git synced 2025-01-11 08:56:14 +01:00

Test package and depndencies are (not) installed

This commit is contained in:
Miro Hrončok 2019-07-18 11:06:48 +02:00
parent e5e6ae06c3
commit 9fec5a14a7
2 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,7 @@ def tox(*args, prune=True, **kwargs):
def test_native_toxenv_current_env(): def test_native_toxenv_current_env():
result = tox("-e", NATIVE_TOXENV, "--current-env") result = tox("-e", NATIVE_TOXENV, "--current-env")
assert result.stdout.splitlines()[0] == NATIVE_EXECUTABLE assert result.stdout.splitlines()[0] == NATIVE_EXECUTABLE
assert not (DOT_TOX / NATIVE_TOXENV / "lib").is_dir()
def test_all_toxenv_current_env(): def test_all_toxenv_current_env():
@ -58,6 +59,11 @@ def test_regular_run():
assert "/.tox/py37/bin/python" in lines[1] assert "/.tox/py37/bin/python" in lines[1]
assert "/.tox/py38/bin/python" in lines[2] assert "/.tox/py38/bin/python" in lines[2]
assert "congratulations" in result.stdout assert "congratulations" in result.stdout
for y in 6, 7, 8:
for pkg in "py", "six", "test":
sitelib = DOT_TOX / f"py3{y}/lib/python3.{y}/site-packages"
assert sitelib.is_dir()
assert len(list(sitelib.glob(f"{pkg}-*.dist-info"))) == 1
def test_regular_after_current_is_not_supported(): def test_regular_after_current_is_not_supported():

View File

@ -4,4 +4,4 @@ envlist = py36,py37,py38
[testenv] [testenv]
deps = pytest deps = pytest
commands = commands =
pytest tests -v pytest -v {posargs} tests