blob: 865279877834259a6fb1d992c1c3ef570e91f406 [file] [log] [blame]
Doug Hellmann94129c72017-01-09 21:24:24 +00001#!/usr/bin/env bash
2
3# Tests for DevStack INI functions
4
5TOP=$(cd $(dirname "$0")/.. && pwd)
6
7source $TOP/functions-common
8source $TOP/inc/python
9
10source $TOP/tests/unittest.sh
11
12echo "Testing Python 3 functions"
13
14# Initialize variables manipulated by functions under test.
15export ENABLED_PYTHON3_PACKAGES=""
16export DISABLED_PYTHON3_PACKAGES=""
17
18assert_false "should not be enabled yet" python3_enabled_for testpackage1
19
20enable_python3_package testpackage1
21assert_equal "$ENABLED_PYTHON3_PACKAGES" "testpackage1" "unexpected result"
22assert_true "should be enabled" python3_enabled_for testpackage1
23
24assert_false "should not be disabled yet" python3_disabled_for testpackage2
25
26disable_python3_package testpackage2
27assert_equal "$DISABLED_PYTHON3_PACKAGES" "testpackage2" "unexpected result"
28assert_true "should be disabled" python3_disabled_for testpackage2
29
30report_results