diff -up pip-1.5.6/tests/functional/test_freeze.py.orig pip-1.5.6/tests/functional/test_freeze.py --- pip-1.5.6/tests/functional/test_freeze.py.orig 2014-11-27 11:23:19.947665742 +0100 +++ pip-1.5.6/tests/functional/test_freeze.py 2014-11-27 11:30:45.937308998 +0100 @@ -1,6 +1,7 @@ import sys import re import textwrap +import pytest from doctest import OutputChecker, ELLIPSIS from tests.lib.local_repos import local_checkout, local_repo @@ -58,6 +59,7 @@ def test_freeze_basic(script): _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_svn(script, tmpdir): """Test freezing a svn checkout""" @@ -79,6 +81,7 @@ def test_freeze_svn(script, tmpdir): _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_git_clone(script, tmpdir): """ Test freezing a Git clone. @@ -109,6 +112,7 @@ def test_freeze_git_clone(script, tmpdir _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_mercurial_clone(script, tmpdir): """ Test freezing a Mercurial clone. @@ -140,6 +144,7 @@ def test_freeze_mercurial_clone(script, _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_bazaar_clone(script, tmpdir): """ Test freezing a Bazaar clone. @@ -175,6 +180,7 @@ def test_freeze_bazaar_clone(script, tmp _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_with_local_option(script): """ Test that wsgiref (from global site-packages) is reported normally, but not with --local. @@ -205,6 +211,7 @@ def test_freeze_with_local_option(script _check_output(result, expected) +@pytest.mark.skipif(True, reason='No network') def test_freeze_with_requirement_option(script): """ Test that new requirements are created correctly with --requirement hints diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py --- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-11-27 11:23:20.863671103 +0100 +++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-11-27 14:25:05.086297126 +0100 @@ -1,4 +1,5 @@ import os +import pytest from os.path import abspath, exists, join @@ -20,6 +21,7 @@ def test_cleanup_after_install(script, d script.assert_no_temp() +@pytest.mark.skipif(True, reason='No network') def test_no_clean_option_blocks_cleaning_after_install(script, data): """ Test --no-clean option blocks cleaning after install @@ -29,6 +31,7 @@ def test_no_clean_option_blocks_cleaning assert exists(build), "build/simple should still exist %s" % str(result) +@pytest.mark.skipif(True, reason='No network') def test_cleanup_after_install_editable_from_hg(script, tmpdir): """ Test clean up after cloning from Mercurial. @@ -87,6 +90,7 @@ def test_cleanup_req_satisifed_no_name(s script.assert_no_temp() +@pytest.mark.skipif(True, reason='No network') def test_download_should_not_delete_existing_build_dir(script): """ It should not delete build/ if existing before run the command @@ -123,6 +127,7 @@ def test_cleanup_after_egg_info_exceptio script.assert_no_temp() +@pytest.mark.skipif(True, reason='No network') def test_cleanup_prevented_upon_build_dir_exception(script, data): """ Test no cleanup occurs after a PreviousBuildDirError diff -up pip-1.5.6/tests/functional/test_install_compat.py.orig pip-1.5.6/tests/functional/test_install_compat.py --- pip-1.5.6/tests/functional/test_install_compat.py.orig 2014-11-27 11:23:20.912671389 +0100 +++ pip-1.5.6/tests/functional/test_install_compat.py 2014-11-27 11:30:36.533251976 +0100 @@ -3,9 +3,11 @@ Tests for compatibility workarounds. """ import os +import pytest from tests.lib import pyversion, assert_all_changes +@pytest.mark.skipif(True, reason='No network') def test_debian_egg_name_workaround(script): """ We can uninstall packages installed with the pyversion removed from the diff -up pip-1.5.6/tests/functional/test_install_config.py.orig pip-1.5.6/tests/functional/test_install_config.py --- pip-1.5.6/tests/functional/test_install_config.py.orig 2014-11-27 11:23:20.920671436 +0100 +++ pip-1.5.6/tests/functional/test_install_config.py 2014-11-27 11:30:03.530051860 +0100 @@ -1,7 +1,7 @@ import os import tempfile import textwrap - +import pytest def test_options_from_env_vars(script): """ @@ -28,6 +28,7 @@ def test_command_line_options_override_e assert "Getting page http://download.zope.org/ppix" in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_env_vars_override_config_file(script, virtualenv): """ Test that environmental variables override settings in config files. @@ -62,6 +63,7 @@ def _test_env_vars_override_config_file( assert "Successfully installed INITools" in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_command_line_append_flags(script, virtualenv, data): """ Test command line flags that append to defaults set by environmental variables. @@ -76,6 +78,7 @@ def test_command_line_append_flags(scrip assert "Skipping link %s" % data.find_links in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_command_line_appends_correctly(script, data): """ Test multiple appending options set by environmental variables. diff -up pip-1.5.6/tests/functional/test_install_download.py.orig pip-1.5.6/tests/functional/test_install_download.py --- pip-1.5.6/tests/functional/test_install_download.py.orig 2014-11-27 11:23:20.970671729 +0100 +++ pip-1.5.6/tests/functional/test_install_download.py 2014-11-27 11:29:42.503924368 +0100 @@ -1,9 +1,11 @@ import os import textwrap +import pytest from tests.lib.path import Path +@pytest.mark.skipif(True, reason='No network') def test_download_if_requested(script): """ It should download (in the scratch path) and not install if requested. @@ -13,6 +15,7 @@ def test_download_if_requested(script): assert script.site_packages/ 'initools' not in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_download_wheel(script): """ Test using "pip install --download" to download a *.whl archive. @@ -26,6 +29,7 @@ def test_download_wheel(script): assert script.site_packages/ 'piptestpackage' not in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_single_download_from_requirements_file(script): """ It should support download (in the scratch path) from PyPi from a requirements file @@ -38,6 +42,7 @@ def test_single_download_from_requiremen assert script.site_packages/ 'initools' not in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_download_should_download_dependencies(script): """ It should download dependencies (in the scratch path) @@ -77,6 +82,7 @@ def test_download_should_download_wheel_ assert Path('scratch') / dep_filename in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_download_should_skip_existing_files(script): """ It should not download files already existing in the scratch dir diff -up pip-1.5.6/tests/functional/test_install_extras.py.orig pip-1.5.6/tests/functional/test_install_extras.py --- pip-1.5.6/tests/functional/test_install_extras.py.orig 2014-11-27 11:23:21.066672291 +0100 +++ pip-1.5.6/tests/functional/test_install_extras.py 2014-11-27 11:31:01.854405511 +0100 @@ -1,6 +1,8 @@ +import pytest from os.path import join +@pytest.mark.skipif(True, reason='No network') def test_simple_extras_install_from_pypi(script): """ Test installing a package from PyPI using extras dependency Paste[openid]. @@ -10,6 +12,7 @@ def test_simple_extras_install_from_pypi assert initools_folder in result.files_created, result.files_created +@pytest.mark.skipif(True, reason='No network') def test_no_extras_uninstall(script): """ No extras dependency gets uninstalled when the root package is uninstalled diff -up pip-1.5.6/tests/functional/test_install.py.orig pip-1.5.6/tests/functional/test_install.py --- pip-1.5.6/tests/functional/test_install.py.orig 2014-11-27 11:23:20.227667380 +0100 +++ pip-1.5.6/tests/functional/test_install.py 2014-11-27 11:23:20.825670880 +0100 @@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ from tests.lib.path import Path +@pytest.mark.skipif(True, reason='No network') def test_without_setuptools(script): script.run("pip", "uninstall", "setuptools", "-y") result = script.run( @@ -26,6 +27,7 @@ def test_without_setuptools(script): ) +@pytest.mark.skipif(True, reason='No network') def test_pip_second_command_line_interface_works(script): """ Check if ``pip`` commands behaves equally @@ -39,6 +41,7 @@ def test_pip_second_command_line_interfa assert initools_folder in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_install_from_pypi(script): """ Test installing a package from PyPI. @@ -60,6 +63,7 @@ def test_editable_install(script): assert not result.files_updated, result.files_updated +@pytest.mark.skipif(True, reason='No network') def test_install_editable_from_svn(script, tmpdir): """ Test checking out from svn. @@ -71,6 +75,7 @@ def test_install_editable_from_svn(scrip result.assert_installed('INITools', with_files=['.svn']) +@pytest.mark.skipif(True, reason='No network') def test_download_editable_to_custom_path(script, tmpdir): """ Test downloading an editable using a relative custom src folder. @@ -94,6 +99,7 @@ def test_download_editable_to_custom_pat assert customdl_files_created +@pytest.mark.skipif(True, reason='No network') def test_editable_no_install_followed_by_no_download(script, tmpdir): """ Test installing an editable in two steps (first with --no-install, then with --no-download). @@ -113,6 +119,7 @@ def test_editable_no_install_followed_by result.assert_installed('INITools', without_files=[curdir, '.svn']) +@pytest.mark.skipif(True, reason='No network') def test_no_install_followed_by_no_download(script): """ Test installing in two steps (first with --no-install, then with --no-download). @@ -143,6 +150,7 @@ def test_bad_install_with_no_download(sc "an equivalent install with --no-install?" in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_install_dev_version_from_pypi(script): """ Test using package==dev. @@ -154,6 +162,7 @@ def test_install_dev_version_from_pypi(s assert (script.site_packages / 'initools') in result.files_created, str(result.stdout) +@pytest.mark.skipif(True, reason='No network') def test_install_editable_from_git(script, tmpdir): """ Test cloning from Git. @@ -166,6 +175,7 @@ def test_install_editable_from_git(scrip result.assert_installed('pip-test-package', with_files=['.git']) +@pytest.mark.skipif(True, reason='No network') def test_install_editable_from_hg(script, tmpdir): """ Test cloning from Mercurial. @@ -177,6 +187,7 @@ def test_install_editable_from_hg(script result.assert_installed('ScriptTest', with_files=['.hg']) +@pytest.mark.skipif(True, reason='No network') def test_vcs_url_final_slash_normalization(script, tmpdir): """ Test that presence or absence of final slash in VCS URL is normalized. @@ -188,6 +199,7 @@ def test_vcs_url_final_slash_normalizati assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes +@pytest.mark.skipif(True, reason='No network') def test_install_editable_from_bazaar(script, tmpdir): """ Test checking out from Bazaar. @@ -199,6 +211,7 @@ def test_install_editable_from_bazaar(sc result.assert_installed('django-wikiapp', with_files=['.bzr']) +@pytest.mark.skipif(True, reason='No network') def test_vcs_url_urlquote_normalization(script, tmpdir): """ Test that urlquoted characters are normalized for repo URL comparison. @@ -295,6 +308,7 @@ def test_install_pardir(script, data): assert egg_info_folder in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_install_global_option(script): """ Test using global distutils options. @@ -320,6 +334,7 @@ def test_install_with_hacked_egg_info(sc assert 'Successfully installed hackedegginfo\n' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_install_using_install_option_and_editable(script, tmpdir): """ Test installing a tool using -e and --install-option @@ -334,6 +349,7 @@ def test_install_using_install_option_an assert virtualenv_bin in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_install_global_option_using_editable(script, tmpdir): """ Test using global distutils options, but in an editable installation @@ -345,6 +361,7 @@ def test_install_global_option_using_edi assert '0.2.5\n' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_install_package_with_same_name_in_curdir(script): """ Test installing a package with the same name of a local folder @@ -398,6 +415,7 @@ def test_install_folder_using_relative_p assert egg_folder in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_install_package_which_contains_dev_in_name(script): """ Test installing package from pypi which contains 'dev' in name @@ -409,6 +427,7 @@ def test_install_package_which_contains_ assert egg_info_folder in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_install_package_with_target(script): """ Test installing a package using pip install --target @@ -481,6 +500,7 @@ def test_url_req_case_mismatch(script, d assert egg_folder not in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_compiles_pyc(script): """ Test installing with --compile on @@ -501,6 +521,7 @@ def test_compiles_pyc(script): assert any(exists) +@pytest.mark.skipif(True, reason='No network') def test_no_compiles_pyc(script, data): """ Test installing from wheel with --compile on diff -up pip-1.5.6/tests/functional/test_install_reqs.py.orig pip-1.5.6/tests/functional/test_install_reqs.py --- pip-1.5.6/tests/functional/test_install_reqs.py.orig 2014-11-27 11:23:21.114672571 +0100 +++ pip-1.5.6/tests/functional/test_install_reqs.py 2014-11-27 14:25:42.443560282 +0100 @@ -13,6 +13,7 @@ from tests.lib.local_repos import local_ from tests.lib.path import Path +@pytest.mark.skipif(True, reason='No network') def test_requirements_file(script): """ Test installing from a requirements file. @@ -59,6 +60,7 @@ def test_relative_requirements_file(scri assert (script.site_packages/'fspkg') in result.files_created, str(result.stdout) +@pytest.mark.skipif(True, reason='No network') def test_multiple_requirements_files(script, tmpdir): """ Test installing from multiple nested requirements files. @@ -110,6 +112,7 @@ def test_install_local_editable_with_ext assert script.site_packages/'simple' in res.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_install_local_editable_with_subdirectory(script): version_pkg_path = _create_test_package_with_subdirectory(script, 'version_subpkg') diff -up pip-1.5.6/tests/functional/test_install_upgrade.py.orig pip-1.5.6/tests/functional/test_install_upgrade.py --- pip-1.5.6/tests/functional/test_install_upgrade.py.orig 2014-11-27 11:23:21.159672835 +0100 +++ pip-1.5.6/tests/functional/test_install_upgrade.py 2014-11-27 11:23:21.743676253 +0100 @@ -22,6 +22,7 @@ def test_no_upgrade_unless_requested(scr assert not result.files_created, 'pip install INITools upgraded when it should not have' +@pytest.mark.skipif(True, reason='No network') def test_upgrade_to_specific_version(script): """ It does upgrade to specific version requested. @@ -34,6 +35,7 @@ def test_upgrade_to_specific_version(scr assert script.site_packages/'INITools-0.2-py%s.egg-info' % pyversion in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_upgrade_if_requested(script): """ And it does upgrade if requested. @@ -56,6 +58,7 @@ def test_upgrade_with_newest_already_ins assert 'already up-to-date' in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_upgrade_force_reinstall_newest(script): """ Force reinstallation of a package even if it is already at its newest @@ -69,6 +72,7 @@ def test_upgrade_force_reinstall_newest( assert_all_changes(result, result3, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_before_upgrade(script): """ Automatic uninstall-before-upgrade. @@ -82,6 +86,7 @@ def test_uninstall_before_upgrade(script assert_all_changes(result, result3, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_before_upgrade_from_url(script): """ Automatic uninstall-before-upgrade from URL. @@ -95,6 +100,7 @@ def test_uninstall_before_upgrade_from_u assert_all_changes(result, result3, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_upgrade_to_same_version_from_url(script): """ When installing from a URL the same version that is already installed, no @@ -109,6 +115,7 @@ def test_upgrade_to_same_version_from_ur assert_all_changes(result, result3, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_upgrade_from_reqs_file(script): """ Upgrade from a requirements file. @@ -161,6 +168,7 @@ def test_editable_git_upgrade(script): assert 'some different version' in version2.stdout, "Output: %s" % (version2.stdout) +@pytest.mark.skipif(True, reason='No network') def test_should_not_install_always_from_cache(script): """ If there is an old cached package, pip should download the newer version @@ -173,6 +181,7 @@ def test_should_not_install_always_from_ assert script.site_packages/'INITools-0.1-py%s.egg-info' % pyversion in result.files_created +@pytest.mark.skipif(True, reason='No network') def test_install_with_ignoreinstalled_requested(script): """ Test old conflicting package is completely ignored @@ -185,6 +194,7 @@ def test_install_with_ignoreinstalled_re assert os.path.exists(script.site_packages_path/'INITools-0.3-py%s.egg-info' % pyversion) +@pytest.mark.skipif(True, reason='No network') def test_upgrade_vcs_req_with_no_dists_found(script, tmpdir): """It can upgrade a VCS requirement that has no distributions otherwise.""" req = "%s#egg=pip-test-package" % local_checkout( @@ -194,6 +204,7 @@ def test_upgrade_vcs_req_with_no_dists_f assert not result.returncode +@pytest.mark.skipif(True, reason='No network') def test_upgrade_vcs_req_with_dist_found(script): """It can upgrade a VCS requirement that has distributions on the index.""" # TODO(pnasrat) Using local_checkout fails on windows - oddness with the test path urls/git. diff -up pip-1.5.6/tests/functional/test_install_user.py.orig pip-1.5.6/tests/functional/test_install_user.py --- pip-1.5.6/tests/functional/test_install_user.py.orig 2014-11-27 11:23:21.750676293 +0100 +++ pip-1.5.6/tests/functional/test_install_user.py 2014-11-27 11:23:22.157678676 +0100 @@ -42,7 +42,8 @@ def _patch_dist_in_site_packages(script) @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") class Tests_UserSite: - def test_reset_env_system_site_packages_usersite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_reset_env_system_site_packages_usersite(self, script, virtualenv): """ reset_env(system_site_packages=True) produces env where a --user install can be found using pkg_resources """ @@ -53,7 +54,8 @@ class Tests_UserSite: assert 'INITools'== project_name, "'%s' should be 'INITools'" %project_name - def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): + @pytest.mark.skipif(True, reason='No network') + def test_install_subversion_usersite_editable_with_distribute(self, script, virtualenv, tmpdir): """ Test installing current directory ('.') into usersite after installing distribute """ @@ -85,7 +87,8 @@ class Tests_UserSite: result = script.pip('install', '--user', curdir, cwd=run_from, expect_error=True) assert "Can not perform a '--user' install. User site-packages are not visible in this virtualenv." in result.stdout - def test_install_user_conflict_in_usersite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_install_user_conflict_in_usersite(self, script, virtualenv): """ Test user install with conflict in usersite updates usersite. """ @@ -99,7 +102,8 @@ class Tests_UserSite: assert egg_info_folder in result2.files_created, str(result2) assert not isfile(initools_v3_file), initools_v3_file - def test_install_user_conflict_in_globalsite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_install_user_conflict_in_globalsite(self, script, virtualenv): """ Test user install with conflict in global site ignores site and installs to usersite """ @@ -129,7 +133,8 @@ class Tests_UserSite: assert isdir(egg_info_folder) assert isdir(initools_folder) - def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_upgrade_user_conflict_in_globalsite(self, script, virtualenv): """ Test user install/upgrade with conflict in global site ignores site and installs to usersite """ @@ -159,7 +164,8 @@ class Tests_UserSite: assert isdir(egg_info_folder), result2.stdout assert isdir(initools_folder) - def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_install_user_conflict_in_globalsite_and_usersite(self, script, virtualenv): """ Test user install with conflict in globalsite and usersite ignores global site and updates usersite. """ @@ -190,7 +196,8 @@ class Tests_UserSite: assert isdir(egg_info_folder) assert isdir(initools_folder) - def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_install_user_in_global_virtualenv_with_conflict_fails(self, script, virtualenv): """ Test user install in --system-site-packages virtualenv with conflict in site fails. """ diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py --- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-11-27 14:27:33.238340755 +0100 +++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-11-27 14:28:28.154727603 +0100 @@ -36,6 +36,7 @@ def test_get_refs_should_return_branch_n assert result['branch0.1'] == commit, result +@pytest.mark.skipif(True, reason='No network') def test_get_refs_should_ignore_no_branch(script): version_pkg_path = _create_test_package(script) script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path) @@ -79,6 +80,7 @@ def test_check_rev_options_should_handle # TODO(pnasrat) fix all helpers to do right things with paths on windows. @pytest.mark.skipif("sys.platform == 'win32'") +@pytest.mark.skipif(True, reason='No network') def test_check_submodule_addition(script): """ Submodules are pulled in on install and updated on upgrade. diff -up pip-1.5.6/tests/functional/test_install_vcs.py.orig pip-1.5.6/tests/functional/test_install_vcs.py --- pip-1.5.6/tests/functional/test_install_vcs.py.orig 2014-11-27 11:23:22.169678746 +0100 +++ pip-1.5.6/tests/functional/test_install_vcs.py 2014-11-27 14:27:14.133206173 +0100 @@ -1,7 +1,9 @@ +import pytest from tests.lib import _create_test_package, _change_test_package_version from tests.lib.local_repos import local_checkout +@pytest.mark.skipif(True, reason='No network') def test_install_editable_from_git_with_https(script, tmpdir): """ Test cloning from Git with https. @@ -13,6 +15,7 @@ def test_install_editable_from_git_with_ result.assert_installed('pip-test-package', with_files=['.git']) +@pytest.mark.skipif(True, reason='No network') def test_git_with_sha1_revisions(script): """ Git backend should be able to install from SHA1 revisions @@ -25,6 +28,7 @@ def test_git_with_sha1_revisions(script) assert '0.1' in version.stdout, version.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_with_branch_name_as_revision(script): """ Git backend should be able to install from branch names @@ -37,6 +41,7 @@ def test_git_with_branch_name_as_revisio assert 'some different version' in version.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_with_tag_name_as_revision(script): """ Git backend should be able to install from tag names @@ -49,6 +54,7 @@ def test_git_with_tag_name_as_revision(s assert '0.1' in version.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_with_tag_name_and_update(script, tmpdir): """ Test cloning a git repository and updating to a different version. @@ -64,6 +70,7 @@ def test_git_with_tag_name_and_update(sc assert '0.1.2' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_branch_should_not_be_changed(script, tmpdir): """ Editable installations should not change branch @@ -77,6 +84,7 @@ def test_git_branch_should_not_be_change assert '* master' in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_with_non_editable_unpacking(script, tmpdir): """ Test cloning a git repository from a non-editable URL with a given tag. @@ -88,6 +96,7 @@ def test_git_with_non_editable_unpacking assert '0.1.2' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_git_with_editable_where_egg_contains_dev_string(script, tmpdir): """ Test cloning a git repository from an editable url which contains "dev" string @@ -97,6 +106,7 @@ def test_git_with_editable_where_egg_con result.assert_installed('django-devserver', with_files=['.git']) +@pytest.mark.skipif(True, reason='No network') def test_git_with_non_editable_where_egg_contains_dev_string(script, tmpdir): """ Test cloning a git repository from a non-editable url which contains "dev" string @@ -107,6 +117,7 @@ def test_git_with_non_editable_where_egg assert devserver_folder in result.files_created, str(result) +@pytest.mark.skipif(True, reason='No network') def test_git_with_ambiguous_revs(script): """ Test git with two "names" (tag/branch) pointing to the same commit @@ -121,6 +132,7 @@ def test_git_with_ambiguous_revs(script) result.assert_installed('version-pkg', with_files=['.git']) +@pytest.mark.skipif(True, reason='No network') def test_git_works_with_editable_non_origin_repo(script): # set up, create a git repo and install it as editable from a local directory path version_pkg_path = _create_test_package(script) diff -up pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig pip-1.5.6/tests/functional/test_install_vcs_svn.py --- pip-1.5.6/tests/functional/test_install_vcs_svn.py.orig 2014-11-27 14:30:00.551378474 +0100 +++ pip-1.5.6/tests/functional/test_install_vcs_svn.py 2014-11-27 14:30:03.217397254 +0100 @@ -1,7 +1,8 @@ +import pytest from mock import patch from pip.vcs.subversion import Subversion - +@pytest.mark.skipif(True, reason='No network') @patch('pip.vcs.subversion.call_subprocess') def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): svn = Subversion(url='svn+http://username:password@svn.example.com/') @@ -11,6 +12,7 @@ def test_obtain_should_recognize_auth_in 'http://username:password@svn.example.com/', script.scratch_path/'test']) +@pytest.mark.skipif(True, reason='No network') @patch('pip.vcs.subversion.call_subprocess') def test_export_should_recognize_auth_info_url(call_subprocess_mock, script): svn = Subversion(url='svn+http://username:password@svn.example.com/') diff -up pip-1.5.6/tests/functional/test_install_wheel.py.orig pip-1.5.6/tests/functional/test_install_wheel.py --- pip-1.5.6/tests/functional/test_install_wheel.py.orig 2014-11-27 11:23:22.371679928 +0100 +++ pip-1.5.6/tests/functional/test_install_wheel.py 2014-11-27 11:23:22.372679934 +0100 @@ -92,6 +92,7 @@ def test_install_from_wheel_with_headers result.stdout) +@pytest.mark.skipif(True, reason='No network') def test_install_wheel_with_target(script, data): """ Test installing a wheel using pip install --target diff -up pip-1.5.6/tests/functional/test_list.py.orig pip-1.5.6/tests/functional/test_list.py --- pip-1.5.6/tests/functional/test_list.py.orig 2014-11-27 11:23:22.379679974 +0100 +++ pip-1.5.6/tests/functional/test_list.py 2014-11-27 11:31:06.129431433 +0100 @@ -1,6 +1,7 @@ import os import re import textwrap +import pytest from tests.lib.local_repos import local_checkout @@ -26,6 +27,7 @@ def test_local_flag(script, data): assert 'simple (1.0)' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_uptodate_flag(script, data): """ Test the behavior of --uptodate flag in the list command @@ -39,6 +41,7 @@ def test_uptodate_flag(script, data): assert 'simple2 (3.0)' in result.stdout, str(result) +@pytest.mark.skipif(True, reason='No network') def test_outdated_flag(script, data): """ Test the behavior of --outdated flag in the list command @@ -52,6 +55,7 @@ def test_outdated_flag(script, data): assert 'simple2' not in result.stdout, str(result) #3.0 is latest +@pytest.mark.skipif(True, reason='No network') def test_editables_flag(script, data): """ Test the behavior of --editables flag in the list command diff -up pip-1.5.6/tests/functional/test_search.py.orig pip-1.5.6/tests/functional/test_search.py --- pip-1.5.6/tests/functional/test_search.py.orig 2014-11-27 11:23:22.903683041 +0100 +++ pip-1.5.6/tests/functional/test_search.py 2014-11-27 11:30:57.397378486 +0100 @@ -1,3 +1,4 @@ +import pytest import pip.download from pip.commands.search import (compare_versions, highest_version, @@ -53,6 +54,7 @@ def test_invalid_pypi_transformation(): assert transform_hits(pypi_hits) == expected +@pytest.mark.skipif(True, reason='No network') def test_search(script): """ End to end test of search command. @@ -62,6 +64,7 @@ def test_search(script): assert 'A tool for installing and managing Python packages' in output.stdout +@pytest.mark.skipif(True, reason='No network') def test_multiple_search(script): """ Test searching for multiple packages at once. @@ -80,6 +83,7 @@ def test_search_missing_argument(script) assert 'ERROR: Missing required argument (search query).' in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_run_method_should_return_sucess_when_find_packages(): """ Test SearchCommand.run for found package @@ -91,6 +95,7 @@ def test_run_method_should_return_sucess assert status == SUCCESS +@pytest.mark.skipif(True, reason='No network') def test_run_method_should_return_no_matches_found_when_does_not_find_packages(): """ Test SearchCommand.run for no matches @@ -102,6 +107,7 @@ def test_run_method_should_return_no_mat assert status == NO_MATCHES_FOUND, status +@pytest.mark.skipif(True, reason='No network') def test_search_should_exit_status_code_zero_when_find_packages(script): """ Test search exit status code for package found @@ -110,6 +116,7 @@ def test_search_should_exit_status_code_ assert result.returncode == SUCCESS +@pytest.mark.skipif(True, reason='No network') def test_search_exit_status_code_when_finds_no_package(script): """ Test search exit status code for no matches diff -up pip-1.5.6/tests/functional/test_show.py.orig pip-1.5.6/tests/functional/test_show.py --- pip-1.5.6/tests/functional/test_show.py.orig 2014-11-27 11:23:23.160684545 +0100 +++ pip-1.5.6/tests/functional/test_show.py 2014-11-27 11:30:52.417348289 +0100 @@ -1,4 +1,5 @@ import re +import pytest from pip import __version__ from pip.commands.show import search_packages_info @@ -34,6 +35,7 @@ def test_show_with_files_not_found(scrip assert lines[6] == 'Cannot locate installed-files.txt', lines[5] +@pytest.mark.skipif(True, reason='No network') def test_show_with_all_files(script): """ Test listing all files in the show command. diff -up pip-1.5.6/tests/functional/test_uninstall.py.orig pip-1.5.6/tests/functional/test_uninstall.py --- pip-1.5.6/tests/functional/test_uninstall.py.orig 2014-11-27 11:23:23.168684592 +0100 +++ pip-1.5.6/tests/functional/test_uninstall.py 2014-11-27 11:30:22.367166080 +0100 @@ -3,6 +3,7 @@ from __future__ import with_statement import textwrap import os import sys +import pytest from os.path import join, abspath, normpath from tempfile import mkdtemp from mock import patch @@ -12,6 +13,7 @@ from tests.lib.local_repos import local_ from pip.util import rmtree +@pytest.mark.skipif(True, reason='No network') def test_simple_uninstall(script): """ Test simple install and uninstall. @@ -25,6 +27,7 @@ def test_simple_uninstall(script): assert_all_changes(result, result2, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_with_scripts(script): """ Uninstall an easy_installed package with scripts. @@ -38,6 +41,7 @@ def test_uninstall_with_scripts(script): assert_all_changes(result, result2, [script.venv/'build', 'cache', easy_install_pth]) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_easy_install_after_import(script): """ Uninstall an easy_installed package after it's been imported @@ -50,6 +54,7 @@ def test_uninstall_easy_install_after_im assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_namespace_package(script): """ Uninstall a distribution with a namespace package without clobbering @@ -90,6 +95,7 @@ def test_uninstall_overlapping_package(s assert_all_changes(result2, result3, []) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_console_scripts(script): """ Test uninstalling a package with more files (console_script entry points, extra directories). @@ -102,6 +108,7 @@ def test_uninstall_console_scripts(scrip assert_all_changes(result, result2, [script.venv/'build', 'cache']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_easy_installed_console_scripts(script): """ Test uninstalling package with console_scripts that is easy_installed. @@ -114,6 +121,7 @@ def test_uninstall_easy_installed_consol assert_all_changes(result, result2, [script.venv/'build', 'cache', script.site_packages/'easy-install.pth']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_editable_from_svn(script, tmpdir): """ Test uninstalling an editable installation from svn. @@ -126,6 +134,7 @@ def test_uninstall_editable_from_svn(scr assert_all_changes(result, result2, [script.venv/'src', script.venv/'build', script.site_packages/'easy-install.pth']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_editable_with_source_outside_venv(script, tmpdir): """ Test uninstalling editable install from existing source outside the venv. @@ -149,6 +158,7 @@ def _test_uninstall_editable_with_source assert_all_changes(result, result3, [script.venv/'build', script.site_packages/'easy-install.pth']) +@pytest.mark.skipif(True, reason='No network') def test_uninstall_from_reqs_file(script, tmpdir): """ Test uninstall from a requirements file. diff -up pip-1.5.6/tests/functional/test_uninstall_user.py.orig pip-1.5.6/tests/functional/test_uninstall_user.py --- pip-1.5.6/tests/functional/test_uninstall_user.py.orig 2014-11-27 11:23:23.590687062 +0100 +++ pip-1.5.6/tests/functional/test_uninstall_user.py 2014-11-27 11:29:55.413002643 +0100 @@ -17,7 +17,8 @@ from tests.functional.test_install_user @pytest.mark.skipif("hasattr(sys, 'pypy_version_info')") class Tests_UninstallUserSite: - def test_uninstall_from_usersite(self, script, virtualenv): + @pytest.mark.skipif(True, reason='No network') + def test_uninstall_from_usersite(self, script, virtualenv): """ Test uninstall from usersite """ diff -up pip-1.5.6/tests/functional/test_wheel.py.orig pip-1.5.6/tests/functional/test_wheel.py --- pip-1.5.6/tests/functional/test_wheel.py.orig 2014-11-27 11:23:23.598687109 +0100 +++ pip-1.5.6/tests/functional/test_wheel.py 2014-11-27 11:30:30.345214455 +0100 @@ -2,6 +2,7 @@ import os import sys import textwrap +import pytest from os.path import exists @@ -20,6 +21,7 @@ def test_pip_wheel_fails_without_wheel(s assert "'pip wheel' requires the 'wheel' package" in result.stdout +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_success(script, data): """ Test 'pip wheel' success. @@ -32,6 +34,7 @@ def test_pip_wheel_success(script, data) assert "Successfully built simple" in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_downloads_wheels(script, data): """ Test 'pip wheel' downloads wheels @@ -46,6 +49,7 @@ def test_pip_wheel_downloads_wheels(scri assert "Saved" in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_fail(script, data): """ Test 'pip wheel' failure. @@ -59,6 +63,7 @@ def test_pip_wheel_fail(script, data): assert "Failed to build wheelbroken" in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_ignore_wheels_editables(script, data): """ Test 'pip wheel' ignores editables @@ -85,6 +90,7 @@ def test_pip_wheel_ignore_wheels_editabl assert ignore_editable in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_no_clean_option_blocks_cleaning_after_wheel(script, data): """ Test --no-clean option blocks cleaning after wheel build @@ -95,6 +101,7 @@ def test_no_clean_option_blocks_cleaning assert exists(build), "build/simple should still exist %s" % str(result) +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_source_deps(script, data): """ Test 'pip wheel --use-wheel' finds and builds source archive dependencies of wheels @@ -108,6 +115,7 @@ def test_pip_wheel_source_deps(script, d assert "Successfully built source" in result.stdout, result.stdout +@pytest.mark.skipif(True, reason='No network') def test_pip_wheel_fail_cause_of_previous_build_dir(script, data): """Test when 'pip wheel' tries to install a package that has a previous build directory""" diff -up pip-1.5.6/tests/unit/test_finder.py.orig pip-1.5.6/tests/unit/test_finder.py --- pip-1.5.6/tests/unit/test_finder.py.orig 2014-11-27 11:23:23.937689093 +0100 +++ pip-1.5.6/tests/unit/test_finder.py 2014-11-27 14:30:48.597716927 +0100 @@ -71,6 +71,7 @@ def test_finder_detects_latest_already_s finder.find_requirement(req, True) +@pytest.mark.skipif(True, reason='No network') def test_finder_detects_latest_already_satisfied_pypi_links(): """Test PackageFinder detects latest already satisified using pypi links""" req = InstallRequirement.from_line('initools', None) @@ -199,6 +200,7 @@ def test_finder_priority_file_over_page( assert link.url.startswith("file://") +@pytest.mark.skipif(True, reason='No network') def test_finder_priority_page_over_deplink(): """Test PackageFinder prefers page links over equivalent dependency links""" req = InstallRequirement.from_line('gmpy==1.15', None) diff -up pip-1.5.6/tests/unit/test_req.py.orig pip-1.5.6/tests/unit/test_req.py --- pip-1.5.6/tests/unit/test_req.py.orig 2014-11-27 11:23:23.946689145 +0100 +++ pip-1.5.6/tests/unit/test_req.py 2014-11-27 11:23:23.947689151 +0100 @@ -149,6 +149,7 @@ def test_parse_editable_local_extras(isd normcase_mock.return_value = "/some/path/foo" assert parse_editable('foo[bar,baz]', 'git') == (None, 'file:///some/path/foo', ('bar', 'baz')) +@pytest.mark.skipif(True, reason='No network') def test_remote_reqs_parse(): """ Test parsing a simple remote requirements file diff -up pip-1.5.6/tests/functional/test_install_cleanup.py.orig pip-1.5.6/tests/functional/test_install_cleanup.py --- pip-1.5.6/tests/functional/test_install_cleanup.py.orig 2014-12-01 13:31:24.075490830 +0100 +++ pip-1.5.6/tests/functional/test_install_cleanup.py 2014-12-01 13:30:59.208326741 +0100 @@ -62,6 +62,7 @@ def test_cleanup_after_install_from_loca script.assert_no_temp() +@pytest.mark.skipif(True, reason='No network') def test_no_install_and_download_should_not_leave_build_dir(script): """ It should remove build/ dir if it was pip that created diff -up pip-1.5.6/tests/functional/test_install_vcs_git.py.orig pip-1.5.6/tests/functional/test_install_vcs_git.py --- pip-1.5.6/tests/functional/test_install_vcs_git.py.orig 2014-12-01 13:32:11.419803237 +0100 +++ pip-1.5.6/tests/functional/test_install_vcs_git.py 2014-12-01 13:32:30.298927814 +0100 @@ -13,6 +13,7 @@ from tests.lib.git_submodule_helpers imp ) +@pytest.mark.skipif(True, reason='No network') def test_get_refs_should_return_tag_name_and_commit_pair(script): version_pkg_path = _create_test_package(script) script.run('git', 'tag', '0.1', cwd=version_pkg_path) @@ -25,6 +26,7 @@ def test_get_refs_should_return_tag_name assert result['0.2'] == commit, result +@pytest.mark.skipif(True, reason='No network') def test_get_refs_should_return_branch_name_and_commit_pair(script): version_pkg_path = _create_test_package(script) script.run('git', 'branch', 'branch0.1', cwd=version_pkg_path)