diff options
| author | Bernát Gábor <bgabor8@bloomberg.net> | 2021-02-01 08:33:50 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-01 08:33:50 +0000 |
| commit | 30e1ea40d0160d18e6d62beb8eba287e79f70eca (patch) | |
| tree | 904dcbdb07fcd247189de6a35acff82a977dadbd /tests/tox_env/python/virtual_env | |
| parent | 716e79d97d3ba4a09ed4c0cf873468714ab4a121 (diff) | |
| download | tox-git-30e1ea40d0160d18e6d62beb8eba287e79f70eca.tar.gz | |
Add package_root support (#1891)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
Diffstat (limited to 'tests/tox_env/python/virtual_env')
| -rw-r--r-- | tests/tox_env/python/virtual_env/test_package.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/tox_env/python/virtual_env/test_package.py b/tests/tox_env/python/virtual_env/test_package.py index d3ad4328..b1819452 100644 --- a/tests/tox_env/python/virtual_env/test_package.py +++ b/tests/tox_env/python/virtual_env/test_package.py @@ -115,3 +115,19 @@ def test_get_package_deps_different_extras(pkg_with_extras_project: Path, tox_pr "a": ["setuptools", "wheel", "appdirs>=1.4.3", "colorama>=0.4.3", "sphinx>=3", "sphinx-rtd-theme<1,>=0.4.3"], "b": ["appdirs>=1.4.3", "colorama>=0.4.3", "black>=3", "flake8"], } + + +def test_package_root_via_root(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None: + ini = f"[tox]\npackage_root={demo_pkg_inline}\n[testenv]\npackage=wheel\nwheel_build_env=.pkg" + proj = tox_project({"tox.ini": ini}) + proj.patch_execute(lambda r: 0 if "install" in r.run_id else None) + result = proj.run("r", "--notest") + result.assert_success() + + +def test_package_root_via_testenv(tox_project: ToxProjectCreator, demo_pkg_inline: Path) -> None: + ini = f"[testenv]\npackage=wheel\nwheel_build_env=.pkg\npackage_root={demo_pkg_inline}" + proj = tox_project({"tox.ini": ini}) + proj.patch_execute(lambda r: 0 if "install" in r.run_id else None) + result = proj.run("r", "--notest") + result.assert_success() |
