blob: 1f5453c4c7867933585971bc5c61f5cf275e8550 [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.
Doug Hellmann94129c72017-01-09 21:24:24 +000015export DISABLED_PYTHON3_PACKAGES=""
16
Doug Hellmann36377f62018-12-04 11:33:03 -050017assert_true "should be enabled by default" python3_enabled_for testpackage1
Doug Hellmann94129c72017-01-09 21:24:24 +000018
19assert_false "should not be disabled yet" python3_disabled_for testpackage2
20
21disable_python3_package testpackage2
22assert_equal "$DISABLED_PYTHON3_PACKAGES" "testpackage2" "unexpected result"
23assert_true "should be disabled" python3_disabled_for testpackage2
24
25report_results