From 5f1d8ee3096f1d2bb2cda63f52467ce826f96a63 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 30 Mar 2018 12:53:59 -0400 Subject: [PATCH] Final test updates --- tests/test_pipenv.py | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/tests/test_pipenv.py b/tests/test_pipenv.py index 7e169c1e..558e1dbe 100644 --- a/tests/test_pipenv.py +++ b/tests/test_pipenv.py @@ -383,6 +383,7 @@ tablib = "*" shutil.copy(source_path, os.path.join(p.path, file_name)) os.mkdir(os.path.join(p.path, "tablib")) c = p.pipenv('install {}'.format(file_name)) + assert c.return_code == 0 c = p.pipenv('uninstall --all') assert c.return_code == 0 assert 'tablib' in c.out @@ -518,10 +519,6 @@ tablib = "<0.12" @pytest.mark.run @pytest.mark.install - @pytest.mark.skipif( - sys.version_info < (3, 0), - reason='Why is this failing on Travis? I cannot reproduce locally.', - ) def test_multiprocess_bug_and_install(self, pypi): with temp_environ(): os.environ['PIPENV_MAX_SUBPROCESS'] = '2' @@ -661,7 +658,6 @@ funcsigs = {version = "*", os_name = "== 'splashwear'"} @pytest.mark.markers @pytest.mark.install - @pytest.mark.skip(reason='Does not actually work. Will fix later.') def test_global_overrides_environment_markers(self, pypi): """Empty (unconditional) dependency should take precedence. @@ -1040,14 +1036,6 @@ maya = "*" @pytest.mark.lock @pytest.mark.requirements @pytest.mark.complex - @pytest.mark.skipif( - not WE_HAVE_INTERNET, - reason='does not work without Internet', - ) - @pytest.mark.skipif( # FIXME: Delete this after #1854 is merged? - sys.version_info < (3, 0), - reason="odfpy egg causes errors during locking (#1849)", - ) def test_complex_lock_deep_extras(self): # records[pandas] requires tablib[pandas] which requires pandas. # This uses the real PyPI; Pandas has too many requirements to mock. @@ -1081,9 +1069,10 @@ flask = "==0.12.2" pytest = "==3.1.1" """.strip() f.write(contents) - - p.pipenv('lock') - + c = p.pipenv('install') + assert c.return_code == 0 + c = p.pipenv('lock') + assert c.return_code == 0 with open(p.pipfile_path, 'w') as f: contents = """ [packages] @@ -1150,6 +1139,7 @@ requests = "==2.14.0" shutil.copy(source_path, os.path.join(p.path, file_name)) c = p.pipenv('install {}'.format(file_name)) + assert c.return_code == 0 key = [k for k in p.pipfile['packages'].keys()][0] dep = p.pipfile['packages'][key] @@ -1243,12 +1233,12 @@ flask = "==0.12.2" os.environ['PYPI_PASSWORD'] = 'pass' assert Project().get_lockfile_hash() is None c = p.pipenv('install') + assert c.return_code == 0 lock_hash = Project().get_lockfile_hash() assert lock_hash is not None assert lock_hash == Project().calculate_pipfile_hash() # sanity check on pytest assert 'PYPI_USERNAME' not in str(pipfile.load(p.pipfile_path)) - assert c.return_code == 0 assert Project().get_lockfile_hash() == Project().calculate_pipfile_hash() os.environ['PYPI_PASSWORD'] = 'pass2' assert Project().get_lockfile_hash() == Project().calculate_pipfile_hash()