summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Cross <hodgestar+hg@gmail.com>2010-04-15 17:08:02 +0200
committerSimon Cross <hodgestar+hg@gmail.com>2010-04-15 17:08:02 +0200
commit67f82ddf6f4d635cdbebc428c383b85a0a6481b7 (patch)
tree1ec667576b9d09bfca4d4d84cd3801b9ae504c6b
parent0ea37716d42ac4fdd855ef5792d4ce97be095554 (diff)
downloadpip-67f82ddf6f4d635cdbebc428c383b85a0a6481b7.tar.gz
Add test that checks for a sensible error message on encountering missing source folders while using --no-download.
-rw-r--r--tests/test_basic.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_basic.py b/tests/test_basic.py
index f1d911206..8e350a768 100644
--- a/tests/test_basic.py
+++ b/tests/test_basic.py
@@ -131,6 +131,16 @@ def test_no_install_followed_by_no_download():
assert 'build/INITools' not in result.files_created
assert 'build/INITools/INITools.egg-info' not in result.files_created
+def test_bad_install_with_no_download():
+ """
+ Test that --no-download behaves sensibly if the package source can't be found.
+
+ """
+ reset_env()
+
+ result = run_pip('install', 'INITools==0.2', '--no-download', expect_error=True)
+ assert result.stdout.find("perhaps --no-download was used without first running an equivalent install with --no-install?") > 0
+
def test_install_dev_version_from_pypi():
"""
Test using package==dev.