@@ -23,8 +23,7 @@ setUp () {
23
23
24
24
test_mkvirtualenv () {
25
25
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 ]"
28
27
}
29
28
30
29
test_cdvirtual () {
@@ -38,20 +37,42 @@ test_cdsitepackages () {
38
37
pushd " $( pwd) " > /dev/null
39
38
cdsitepackages
40
39
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) "
42
42
popd > /dev/null
43
43
}
44
44
45
- test_mkvirtualenv_switches () {
45
+ test_mkvirtualenv_activates () {
46
46
mkvirtualenv " env2"
47
47
assertTrue virtualenvwrapper_verify_active_environment
48
48
assertSame " env2" $( basename " $VIRTUAL_ENV " )
49
49
}
50
50
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
+
51
72
test_workon () {
52
73
workon env1
53
74
assertTrue virtualenvwrapper_verify_active_environment
54
- assertSame " env1" $( basename " $VIRTUAL_ENV " )
75
+ assertSame " env1" $( basename " $VIRTUAL_ENV " )
55
76
}
56
77
57
78
test_postactivate_hook () {
0 commit comments