File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-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
+ # unset HOOK_VERBOSE_OPTION
10
+
11
+ setUp () {
12
+ rm -rf " $WORKON_HOME "
13
+ mkdir -p " $WORKON_HOME "
14
+ source " $test_dir /../virtualenvwrapper.sh"
15
+ mkdir " $WORKON_HOME /start_here"
16
+ mkdir " $WORKON_HOME /on_the_stack"
17
+ echo
18
+ }
19
+
20
+ tearDown () {
21
+ if type deactivate > /dev/null 2>&1
22
+ then
23
+ deactivate
24
+ fi
25
+ rm -rf " $WORKON_HOME "
26
+ }
27
+
28
+ test_ticket_101 () {
29
+ mkvirtualenv some_env
30
+ deactivate
31
+ cd " $WORKON_HOME /start_here"
32
+ pushd " $WORKON_HOME /on_the_stack"
33
+ rmvirtualenv some_env
34
+ mkvirtualenv --no-site-packages some_env
35
+ # echo "After mkvirtualenv: `pwd`"
36
+ deactivate
37
+ # echo "After deactivate: `pwd`"
38
+ popd
39
+ # echo "After popd: `pwd`"
40
+ current_dir=$( pwd)
41
+ assertSame " $WORKON_HOME /start_here" " $current_dir "
42
+ }
43
+
44
+ . " $test_dir /shunit2"
You can’t perform that action at this time.
0 commit comments