File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # set -x
4+
5+ test_dir=$( cd $( dirname $0 ) && pwd)
6+
7+ export WORKON_HOME=" $( echo ${TMPDIR:-/ tmp} /WORKON_HOME | sed ' s|//|/|g' ) "
8+
9+ oneTimeSetUp () {
10+ rm -rf " $WORKON_HOME "
11+ mkdir -p " $WORKON_HOME "
12+ source " $test_dir /../virtualenvwrapper.sh"
13+ }
14+
15+ oneTimeTearDown () {
16+ rm -rf " $WORKON_HOME "
17+ rm -f " $test_dir /requirements.txt"
18+ }
19+
20+ setUp () {
21+ echo
22+ rm -f " $test_dir /catch_output"
23+ }
24+
25+ test_associate () {
26+ project=" /dev/null"
27+ env=" env1"
28+ ptrfile=" $WORKON_HOME /$env /.project"
29+ mkvirtualenv -a " $project " " $env " > /dev/null 2>&1
30+ assertTrue " .project not found" " [ -f $ptrfile ]"
31+ assertEquals " $ptrfile contains wrong content" " $project " " $( cat $ptrfile ) "
32+ }
33+
34+ . " $test_dir /shunit2"
You can’t perform that action at this time.
0 commit comments