@@ -23,8 +23,7 @@ setUp () {
2323
2424test_mkvirtualenv () {
2525 mkvirtualenv " env1"
26- assertTrue " [ -d $WORKON_HOME /env1 ]"
27- assertSame " env1" $( basename " $VIRTUAL_ENV " )
26+ assertTrue " Environment directory was not created" " [ -d $WORKON_HOME /env1 ]"
2827}
2928
3029test_cdvirtual () {
@@ -38,20 +37,42 @@ test_cdsitepackages () {
3837 pushd " $( pwd) " > /dev/null
3938 cdsitepackages
4039 pyvers=$( python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d.)
41- assertSame " $VIRTUAL_ENV /lib/python${pyvers} /site-packages" " $( pwd) "
40+ sitepackages=" $VIRTUAL_ENV /lib/python${pyvers} /site-packages"
41+ assertSame " $sitepackages " " $( pwd) "
4242 popd > /dev/null
4343}
4444
45- test_mkvirtualenv_switches () {
45+ test_mkvirtualenv_activates () {
4646 mkvirtualenv " env2"
4747 assertTrue virtualenvwrapper_verify_active_environment
4848 assertSame " env2" $( basename " $VIRTUAL_ENV " )
4949}
5050
51+ # test_mkvirtualenv_sitepackages () {
52+ # # Without the option verify that site-packages are copied.
53+ # mkvirtualenv "env3"
54+ # assertSame "env3" "$(basename $VIRTUAL_ENV)"
55+ # pyvers=$(python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d.)
56+ # sitepackages="$VIRTUAL_ENV/lib/python${pyvers}/site-packages"
57+ # #cat "$sitepackages/easy-install.pth"
58+ # assertTrue "Do not have expected virtualenv.py" "[ -f $sitepackages/virtualenv.py ]"
59+ # rmvirtualenv "env3"
60+ #
61+ # # With the argument, verify that they are not copied.
62+ # mkvirtualenv --no-site-packages "env4"
63+ # assertSame "env4" $(basename "$VIRTUAL_ENV")
64+ # pyvers=$(python -V 2>&1 | cut -f2 -d' ' | cut -f1-2 -d.)
65+ # sitepackages="$VIRTUAL_ENV/lib/python${pyvers}/site-packages"
66+ # assertTrue "[ -f $sitepackages/setuptools.pth ]"
67+ # assertTrue "[ -f $sitepackages/easy-install.pth ]"
68+ # assertFalse "Have virtualenv.py but should not" "[ -f $sitepackages/virtualenv.py ]"
69+ # rmvirtualenv "env4"
70+ # }
71+
5172test_workon () {
5273 workon env1
5374 assertTrue virtualenvwrapper_verify_active_environment
54- assertSame " env1" $( basename " $VIRTUAL_ENV " )
75+ assertSame " env1" $( basename " $VIRTUAL_ENV " )
5576}
5677
5778test_postactivate_hook () {
0 commit comments