Skip to content

Commit daf7a3c

Browse files
committed
Identify another --no-site-packages test and add one for cpvirtualenv using the default args variable; addresses #102
1 parent 284325c commit daf7a3c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

tests/test_cp.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,22 @@ GLOBAL postcpvirtualenv"
112112

113113
test_no_site_packages () {
114114
# See issue #102
115-
mkvirtualenv "source" --no-site-packages
115+
mkvirtualenv "source" --no-site-packages >/dev/null 2>&1
116116
cpvirtualenv "source" "destination"
117117
ngsp_file="`virtualenvwrapper_get_site_packages_dir`/../no-global-site-packages.txt"
118118
assertTrue "$ngsp_file does not exist in copied env" "[ -f \"$ngsp_file\" ]"
119119
}
120120

121+
test_no_site_packages_default_args () {
122+
# See issue #102
123+
VIRTUALENVWRAPPER_VIRTUALENV_ARGS="--no-site-packages"
124+
# With the argument, verify that they are not copied.
125+
mkvirtualenv "source" >/dev/null 2>&1
126+
cpvirtualenv "source" "destination"
127+
ngsp_file="`virtualenvwrapper_get_site_packages_dir`/../no-global-site-packages.txt"
128+
assertTrue "$ngsp_file does not exist" "[ -f \"$ngsp_file\" ]"
129+
unset VIRTUALENVWRAPPER_VIRTUALENV_ARGS
130+
}
131+
121132
. "$test_dir/shunit2"
122133

tests/test_mkvirtualenv.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ test_mkvirtualenv_sitepackages () {
104104
}
105105

106106
test_mkvirtualenv_args () {
107+
# See issue #102
107108
VIRTUALENVWRAPPER_VIRTUALENV_ARGS="--no-site-packages"
108109
# With the argument, verify that they are not copied.
109110
mkvirtualenv "without_sp2" >/dev/null 2>&1

0 commit comments

Comments
 (0)