Commits

Doug Hellmann committed 4ee77b7

Remove support for Python 2.4 and 2.5. Update tests to work with virtualenv 1.7, where --no-site-packages is now the default.

Comments (0)

Files changed (5)

docs/en/history.rst

   - Add ``-a`` option to :ref:`command-mkvirtualenv` to associate a
     new virtualenv with an existing project directory. Contributed by
     Mike Fogel (:bbuser:`mfogel`).
+  - Drops support for Python 2.4 and 2.5. The tools may still work,
+    but I no longer have a development environment set up for testing
+    them, so I do not officially support them.
 
 2.10.1
 
 test_python_interpreter_set_incorrectly() {
     return_to="$(pwd)"
     cd "$WORKON_HOME"
-    mkvirtualenv --no-site-packages no_wrappers
+    mkvirtualenv no_wrappers
     expected="ImportError: No module named virtualenvwrapper.hook_loader"
     # test_shell is set by tests/run_tests
     if [ "$test_shell" = "" ]
     then
-	export test_shell=$SHELL
+        export test_shell=$SHELL
     fi
     subshell_output=$(VIRTUALENVWRAPPER_PYTHON="$WORKON_HOME/no_wrappers/bin/python" $test_shell $return_to/virtualenvwrapper.sh 2>&1)
-    echo "$subshell_output"
+    #echo "$subshell_output"
     echo "$subshell_output" | grep -q "$expected" 2>&1
     found_it=$?
-    echo "$found_it"
+    #echo "$found_it"
     assertTrue "Expected \'$expected\', got: \'$subshell_output\'" "[ $found_it -eq 0 ]"
     assertFalse "Failed to detect invalid Python location" "VIRTUALENVWRAPPER_PYTHON=$VIRTUAL_ENV/bin/python $SHELL $return_to/virtualenvwrapper.sh >/dev/null 2>&1"
     cd "$return_to"
     unset VIRTUALENVWRAPPER_VIRTUALENV_ARGS
 }
 
+test_no_site_packages_default_behavior () {
+    # See issue #102
+    # virtualenv 1.7 changed to make --no-site-packages the default
+    mkvirtualenv "source" >/dev/null 2>&1
+    cpvirtualenv "source" "destination"
+    ngsp_file="`virtualenvwrapper_get_site_packages_dir`/../no-global-site-packages.txt"
+    assertTrue "$ngsp_file does not exist in copied env" "[ -f \"$ngsp_file\" ]"
+}
+
 . "$test_dir/shunit2"
 

tests/test_toggleglobalsitepackages.sh

 setUp () {
     echo
     rm -f "$test_dir/catch_output"
-    mkvirtualenv --no-site-packages "globaltest"
+    mkvirtualenv --system-site-packages "globaltest"
 }
 
 tearDown () {
 [tox]
-envlist = py27,py26,py25,py24
+envlist = py27,py26
 
 [testenv]
 commands = bash ./tests/run_tests {envdir} []