File: manual_test_install.sh

package info (click to toggle)
virtualenvwrapper 3.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,140 kB
  • sloc: sh: 3,801; python: 991; makefile: 27
file content (40 lines) | stat: -rwxr-xr-x 782 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# Test installation of virtualenvwrapper in a new virtualenv.
#

test_dir=$(dirname $0)
source "$test_dir/../virtualenvwrapper.sh"

export WORKON_HOME="${TMPDIR:-/tmp}/WORKON_HOME"

VERSION=$(python setup.py --version)

oneTimeSetUp() {
    rm -rf "$WORKON_HOME"
    mkdir -p "$WORKON_HOME"
}

oneTimeTearDown() {
    rm -rf "$WORKON_HOME"
}

setUp () {
    echo
}

test_build_ok () {
    (cd "$test_dir/.." && make sdist)
    outcome=$?
 	assertSame "0" "$outcome"
}

test_install () {
    dist_dir=$(dirname $test_dir)/dist
    pip install "$dist_dir/virtualenvwrapper-$VERSION.tar.gz"
    RC=$?
    assertTrue "Error code $RC" "[ $RC -eq 0 ]"
    assertTrue "Missing wrapper script" "[ -f $WORKON_HOME/installtest/bin/virtualenvwrapper.sh ]"
}

. "$test_dir/shunit2"