Commits

Doug Hellmann committed 62ed7f8

Make --python option to mkvirtualenv not sticky

Fixes a problem with mkvirtualenv in which the value
provided to --python is retained for subsequent calls.

Fixes issue #178

Comments (0)

Files changed (3)

docs/source/history.rst

     completion. Contributed by :bbuser:`davidszotten`.
   - Fix an issue with listing project templates if none are
     installed. (:bbissue:`179`)
+  - Fix an issue with the ``--python`` option to ``mkvirtualenv``
+    becoming *sticky* for future calls that do not explicitly specify
+    the option. (:bbissue:`178`)
 
 3.7
 

tests/test_mkvirtualenv.sh

     VIRTUALENVWRAPPER_VIRTUALENV=virtualenv
 }
 
+test_mkvirtualenv_python_not_sticky () {
+    typeset _save=$VIRTUALENVWRAPPER_VIRTUALENV
+    VIRTUALENVWRAPPER_VIRTUALENV=true
+    mkvirtualenv --python blah foo
+    assertSame "" "$interpreter"
+    VIRTUALENVWRAPPER_VIRTUALENV=$_save
+}
+
 
 . "$test_dir/shunit2"

virtualenvwrapper.sh

     typeset envname
     typeset requirements
     typeset packages
+    typeset interpreter
 
     in_args=( "$@" )