From a47a26b87a14ece449c8b95967ebf9b9689c18ba Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Wed, 20 Feb 2019 11:51:15 -0500 Subject: [PATCH] Fix failing tests Signed-off-by: Dan Ryan --- tests/integration/test_install_basic.py | 4 ++-- tests/integration/test_install_twists.py | 2 +- tests/integration/test_install_uri.py | 9 +++++---- tests/integration/test_project.py | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/integration/test_install_basic.py b/tests/integration/test_install_basic.py index 2f91486e..3521ee5b 100644 --- a/tests/integration/test_install_basic.py +++ b/tests/integration/test_install_basic.py @@ -461,11 +461,11 @@ version = "*" extras = ["socks"] """.strip() f.write(contents) - c = p.pipenv("install plette[validation]") + c = p.pipenv("install plette") assert c.return_code == 0 with open(p.pipfile_path) as f: contents = f.read() assert "[packages.requests]" not in contents assert 'six = {version = "*"}' in contents assert 'requests = {version = "*"' in contents - assert 'plette = {' in contents + assert 'plette = "*"' in contents diff --git a/tests/integration/test_install_twists.py b/tests/integration/test_install_twists.py index af6dbd45..98236b8a 100644 --- a/tests/integration/test_install_twists.py +++ b/tests/integration/test_install_twists.py @@ -57,7 +57,7 @@ testpipenv = {path = ".", editable = true, extras = ["dev"]} project.write_toml({"packages": {}, "dev-packages": {}}) c = p.pipenv("install {0}".format(line)) assert c.return_code == 0 - assert "testpipenv" in p.pipfile["packages"], "{0}\n{1}\n\n{2}\n\n{3}".format(p.pipfile, Path(p.pipfile_path).read_text(), Path(os.getcwd()).joinpath("setup.py").read_text(), Path(os.path.join(os.getcwd(), "testpipenv.egg-info/PKG-INFO")).read_text()) + assert "testpipenv" in p.pipfile["packages"] assert p.pipfile["packages"]["testpipenv"]["path"] == "." assert p.pipfile["packages"]["testpipenv"]["extras"] == ["dev"] assert "six" in p.lockfile["default"] diff --git a/tests/integration/test_install_uri.py b/tests/integration/test_install_uri.py index e146d6d3..b0c1e51c 100644 --- a/tests/integration/test_install_uri.py +++ b/tests/integration/test_install_uri.py @@ -124,7 +124,6 @@ def test_local_vcs_urls_work(PipenvInstance, pypi, tmpdir): @pytest.mark.vcs @pytest.mark.install @pytest.mark.needs_internet -@pytest.mark.skip_py27_win @flaky def test_editable_vcs_install(PipenvInstance, pip_src_dir, pypi): with PipenvInstance(pypi=pypi) as p: @@ -239,13 +238,15 @@ def test_get_vcs_refs(PipenvInstance, pip_src_dir): @pytest.mark.vcs @pytest.mark.install @pytest.mark.needs_internet +@pytest.mark.skip_py27_win def test_vcs_entry_supersedes_non_vcs(PipenvInstance, pip_src_dir): """See issue #2181 -- non-editable VCS dep was specified, but not showing up in the lockfile -- due to not running pip install before locking and not locking the resolution graph of non-editable vcs dependencies. """ with PipenvInstance(chdir=True) as p: - pyinstaller_path = p._pipfile.get_fixture_path("git/pyinstaller") + # pyinstaller_path = p._pipfile.get_fixture_path("git/pyinstaller") + pyinstaller_uri = "https://github.com/pyinstaller/pyinstaller.git" with open(p.pipfile_path, "w") as f: f.write( """ @@ -257,7 +258,7 @@ name = "pypi" [packages] PyUpdater = "*" PyInstaller = {{ref = "develop", git = "{0}"}} - """.format(pyinstaller_path.as_uri()).strip() + """.format(pyinstaller_uri).strip() ) c = p.pipenv("install") assert c.return_code == 0 @@ -268,7 +269,7 @@ PyInstaller = {{ref = "develop", git = "{0}"}} assert p.lockfile["default"]["pyinstaller"].get("ref") is not None assert ( p.lockfile["default"]["pyinstaller"]["git"] - == pyinstaller_path.as_uri() + == pyinstaller_uri ) diff --git a/tests/integration/test_project.py b/tests/integration/test_project.py index 57488258..c3eb4096 100644 --- a/tests/integration/test_project.py +++ b/tests/integration/test_project.py @@ -183,7 +183,7 @@ def test_run_in_virtualenv_with_global_context(PipenvInstance, pypi, virtualenv) assert c.return_code == 0 c = p.pipenv('run python -c "import click;print(click.__file__)"') assert c.return_code == 0 - assert c.out.strip().startswith(virtualenv.as_posix()) + assert c.out.strip().startswith(str(virtualenv)) c = p.pipenv("clean --dry-run") assert c.return_code == 0 assert "click" in c.out