File: test_mkvirtualenv_requirements.sh

package info (click to toggle)
virtualenvwrapper 4.8.4-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 796 kB
  • sloc: sh: 3,369; python: 595; makefile: 185
file content (28 lines) | stat: -rwxr-xr-x 589 bytes parent folder | download | duplicates (2)
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
# -*- mode: shell-script -*-

test_dir=$(cd $(dirname $0) && pwd)
source "$test_dir/setup.sh"

oneTimeSetUp() {
    rm -rf "$WORKON_HOME"
    mkdir -p "$WORKON_HOME"
    source "$test_dir/../virtualenvwrapper.sh"
}

oneTimeTearDown() {
    rm -rf "$WORKON_HOME"
    rm -f "$TMPDIR/requirements.txt"
}

setUp () {
    echo
}

test_requirements_file () {
    echo "IPy" > "$TMPDIR/requirements.txt"
    mkvirtualenv -r "$TMPDIR/requirements.txt" "env3" >/dev/null 2>&1
    installed=$(pip freeze)
    assertTrue "IPy not found in $installed" "pip freeze | grep IPy"
}

. "$test_dir/shunit2"