mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 14:50:16 +00:00
Move to install test suite
This commit is contained in:
@@ -446,3 +446,25 @@ def test_install_package_with_dots(PipenvInstance, pypi):
|
||||
c = p.pipenv("install backports.html")
|
||||
assert c.ok
|
||||
assert "backports.html" in p.pipfile["packages"]
|
||||
|
||||
|
||||
@pytest.mark.install
|
||||
def test_rewrite_outline_table(PipenvInstance, pypi):
|
||||
with PipenvInstance(pypi=pypi, chdir=True) as p:
|
||||
with open(p.pipfile_path, 'w') as f:
|
||||
contents = """
|
||||
[packages]
|
||||
six = {version = "*", editable = true}
|
||||
|
||||
[packages.requests]
|
||||
version = "*"
|
||||
""".strip()
|
||||
f.write(contents)
|
||||
c = p.pipenv("install -e click")
|
||||
assert c.return_code == 0
|
||||
with open(p.pipfile_path) as f:
|
||||
contents = f.read()
|
||||
assert "[packages.requests]" not in contents
|
||||
assert 'six = {version = "*", editable = true}' in contents
|
||||
assert 'requests = {version = "*"}' in contents
|
||||
assert 'click = {' in contents
|
||||
|
||||
@@ -148,29 +148,6 @@ six = {{version = "*", index = "pypi"}}
|
||||
assert c.return_code == 0
|
||||
|
||||
|
||||
@pytest.mark.install
|
||||
@pytest.mark.project
|
||||
def test_rewrite_outline_table(PipenvInstance, pypi):
|
||||
with PipenvInstance(pypi=pypi, chdir=True) as p:
|
||||
with open(p.pipfile_path, 'w') as f:
|
||||
contents = """
|
||||
[packages]
|
||||
six = {version = "*", editable = true}
|
||||
|
||||
[packages.requests]
|
||||
version = "*"
|
||||
""".strip()
|
||||
f.write(contents)
|
||||
c = p.pipenv("install -e click")
|
||||
assert c.return_code == 0
|
||||
with open(p.pipfile_path) as f:
|
||||
contents = f.read()
|
||||
assert "[packages.requests]" not in contents
|
||||
assert 'six = {version = "*", editable = true}' in contents
|
||||
assert 'requests = {version = "*"}' in contents
|
||||
assert 'click = {' in contents
|
||||
|
||||
|
||||
@pytest.mark.install
|
||||
@pytest.mark.project
|
||||
def test_include_editable_packages(PipenvInstance, pypi, testsroot, pathlib_tmpdir):
|
||||
@@ -190,6 +167,7 @@ def test_include_editable_packages(PipenvInstance, pypi, testsroot, pathlib_tmpd
|
||||
|
||||
|
||||
@pytest.mark.project
|
||||
@pytest.mark.virtualenv
|
||||
def test_run_in_virtualenv(PipenvInstance, pypi, virtualenv):
|
||||
with PipenvInstance(chdir=True, pypi=pypi) as p:
|
||||
os.environ.pop("PIPENV_IGNORE_VIRTUALENVS", None)
|
||||
|
||||
Reference in New Issue
Block a user