File: e2e-tests

package info (click to toggle)
python-pipdeptree 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 372 kB
  • sloc: python: 1,044; sh: 55; makefile: 30
file content (48 lines) | stat: -rwxr-xr-x 788 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/usr/bin/env bash

set -e

PROFILE=$1
PYTHON_EXE=${PYTHON_EXE:-python3.6}
PIP_VERSION=${PIP_VERSION:-latest}

if [ "$PROFILE" == "conflicting" ]; then
    PIP_VERSION=20.2.3
fi

cd profiles/$PROFILE

echo "Profile dir: $(pwd)"

env_dir=".env_$(basename $PYTHON_EXE)_pip-${PIP_VERSION}"

echo "Profile env: $env_dir"

if [ ! -d $env_dir ]; then
    virtualenv -p $PYTHON_EXE $env_dir
fi

pip=$env_dir/bin/pip

if [ "$PIP_VERSION" == "latest" ]; then
    $pip install -U pip
else
    $pip install pip==$PIP_VERSION
fi

# Install requirements
$pip install -r requirements.txt

# Install pipdeptree
$pip install -e ../../../

pip_deptree=$env_dir/bin/pipdeptree

export TEST_PROFILE_DIR="profiles/$PROFILE"
export PIPDEPTREE_EXE=$TEST_PROFILE_DIR/$pip_deptree

cd -

py.test e2e_tests.py