We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca54320 commit c209d1fCopy full SHA for c209d1f
1 file changed
tests/test_mkvirtualenv_associate.sh
@@ -0,0 +1,34 @@
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
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"
0 commit comments