forked from openstack/devstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_python.sh
More file actions
executable file
·30 lines (19 loc) · 874 Bytes
/
test_python.sh
File metadata and controls
executable file
·30 lines (19 loc) · 874 Bytes
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
#!/usr/bin/env bash
# Tests for DevStack INI functions
TOP=$(cd $(dirname "$0")/.. && pwd)
source $TOP/functions-common
source $TOP/inc/python
source $TOP/tests/unittest.sh
echo "Testing Python 3 functions"
# Initialize variables manipulated by functions under test.
export ENABLED_PYTHON3_PACKAGES=""
export DISABLED_PYTHON3_PACKAGES=""
assert_false "should not be enabled yet" python3_enabled_for testpackage1
enable_python3_package testpackage1
assert_equal "$ENABLED_PYTHON3_PACKAGES" "testpackage1" "unexpected result"
assert_true "should be enabled" python3_enabled_for testpackage1
assert_false "should not be disabled yet" python3_disabled_for testpackage2
disable_python3_package testpackage2
assert_equal "$DISABLED_PYTHON3_PACKAGES" "testpackage2" "unexpected result"
assert_true "should be disabled" python3_disabled_for testpackage2
report_results