Doug Hellmann avatar Doug Hellmann committed 96c1416

quiet some tests

Comments (0)

Files changed (6)

tests/test_dir_stack.sh

 
 #unset HOOK_VERBOSE_OPTION
 
+oneTimeSetUp() {
+    test_begin_dir=$(pwd)
+}
+
+oneTimeTearDown() {
+    cd "$test_begin_dir"
+}
+
 setUp () {
     rm -rf "$WORKON_HOME"
     mkdir -p "$WORKON_HOME"
     cd "$WORKON_HOME/start_here"
     pushd "$WORKON_HOME/on_the_stack"
     rmvirtualenv some_env
-    mkvirtualenv --no-site-packages some_env
+    mkvirtualenv some_env >/dev/null 2>&1
     #echo "After mkvirtualenv: `pwd`"
     deactivate
     #echo "After deactivate: `pwd`"
     #echo "After popd: `pwd`"
     current_dir=$(pwd)
     assertSame "$WORKON_HOME/start_here" "$current_dir"
+
 }
 
 . "$test_dir/shunit2"
 }
 
 test_get_site_packages_dir () {
-    mkvirtualenv "lssitepackagestest"
+    mkvirtualenv "lssitepackagestest" >/dev/null 2>&1
     d=$(virtualenvwrapper_get_site_packages_dir)
     echo "site-packages in $d"
     assertTrue "site-packages dir $d does not exist" "[ -d $d ]"
 }
 
 test_lssitepackages () {
-    mkvirtualenv "lssitepackagestest"
+    mkvirtualenv "lssitepackagestest" >/dev/null 2>&1
     contents="$(lssitepackages)"    
     actual=$(echo $contents | grep easy-install.pth)
     expected=$(echo $contents)
 }
 
 test_lssitepackages_add2virtualenv () {
-    mkvirtualenv "lssitepackagestest"
+    mkvirtualenv "lssitepackagestest" >/dev/null 2>&1
     parent_dir=$(dirname $(pwd))
     base_dir=$(basename $(pwd))
     add2virtualenv "../$base_dir"

tests/test_project_activate.sh

 }
 
 test_activate () {
-    mkproject myproject
+    mkproject myproject >/dev/null 2>&1
     deactivate
     cd $TMPDIR
     assertSame "" "$VIRTUAL_ENV"

tests/test_project_templates.sh

 export PROJECT_HOME="$(echo ${TMPDIR:-/tmp}/PROJECT_HOME | sed 's|//|/|g')"
 
 oneTimeSetUp() {
-    (cd "$test_dir/testtemplate" && python setup.py install)
+    (cd "$test_dir/testtemplate" && rm -rf build && python setup.py install)
     rm -rf "$WORKON_HOME"
     mkdir -p "$WORKON_HOME"
     rm -rf "$PROJECT_HOME"
 }
 
 test_apply_template () {
-    mkproject -t test proj1
+    mkproject -t test proj1 >/dev/null 2>&1
     assertTrue "Test file not created" "[ -f TEST_FILE ]"
     assertTrue "project name not found" "grep -q proj1 TEST_FILE"
 }

tests/test_toggleglobalsitepackages.sh

 setUp () {
     echo
     rm -f "$test_dir/catch_output"
-    mkvirtualenv --system-site-packages "globaltest"
+    mkvirtualenv --system-site-packages "globaltest"  >/dev/null 2>&1
 }
 
 tearDown () {
-    deactivate
-    rmvirtualenv "globaltest"
+    deactivate >/dev/null 2>&1
+    rmvirtualenv "globaltest" >/dev/null 2>&1
 }
 
 test_toggleglobalsitepackages () {

tests/test_workon.sh

     rm -rf "$WORKON_HOME"
     mkdir -p "$WORKON_HOME"
     source "$test_dir/../virtualenvwrapper.sh"
-    mkvirtualenv "env1"
-    mkvirtualenv "env2"
+    mkvirtualenv "env1" >/dev/null 2>&1
+    mkvirtualenv "env2" >/dev/null 2>&1
     deactivate >/dev/null 2>&1 
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.