Commits

Doug Hellmann committed f1db8cd

fix issue with toggleglobalsitepackages tests that was hidden by old test virtualenv

  • Participants
  • Parent commits 3f8ddac

Comments (0)

Files changed (1)

File tests/test_toggleglobalsitepackages.sh

 setUp () {
     echo
     rm -f "$test_dir/catch_output"
-    mkvirtualenv --system-site-packages "globaltest"  >/dev/null 2>&1
 }
 
 tearDown () {
     deactivate >/dev/null 2>&1
-    rmvirtualenv "globaltest" >/dev/null 2>&1
 }
 
 test_toggleglobalsitepackages () {
-    ngsp_file="`virtualenvwrapper_get_site_packages_dir`/../no-global-site-packages.txt"
-    assertTrue "$ngsp_file does not exist" "[ -f \"$ngsp_file\" ]"
+    mkvirtualenv --no-site-packages "test1"
+    ngsp_file=$(dirname "`virtualenvwrapper_get_site_packages_dir`")/no-global-site-packages.txt
+    assertTrue "$ngsp_file does not exist 1" "[ -f \"$ngsp_file\" ]"
     toggleglobalsitepackages -q
     assertFalse "$ngsp_file exists" "[ -f \"$ngsp_file\" ]"
     toggleglobalsitepackages -q
-    assertTrue "$ngsp_file does not exist" "[ -f \"$ngsp_file\" ]"
+    assertTrue "$ngsp_file does not exist 2" "[ -f \"$ngsp_file\" ]"
 }
 
 test_toggleglobalsitepackages_quiet () {
+    mkvirtualenv --no-site-packages "test2"
     assertEquals "Command output is not correct" "Enabled global site-packages" "`toggleglobalsitepackages`"
     assertEquals "Command output is not correct" "Disabled global site-packages" "`toggleglobalsitepackages`"