File: test_expandpath.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 (28 lines) | stat: -rwxr-xr-x 501 bytes parent folder | download
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
#!/bin/sh

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

oneTimeSetUp() {
    source "$test_dir/../virtualenvwrapper.sh"
    echo $PYTHONPATH
}

oneTimeTearDown() {
    return 0
}

test_tilde() {
    assertSame "$HOME" "$(virtualenvwrapper_expandpath ~)"
}

test_vars() {
    assertSame "$HOME" "$(virtualenvwrapper_expandpath '$HOME')"
}

test_tilde_vars() {
    assertSame "$HOME" "$(virtualenvwrapper_expandpath '~$USER')"
}

. "$test_dir/shunit2"