From 0eb086ab783048b84ce8e08f676c43a0542509ff Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 11 Dec 2012 12:07:34 +0100 Subject: Add selftests for is_optional(). --- kconfigtest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'kconfigtest.py') diff --git a/kconfigtest.py b/kconfigtest.py index 088b456..0faafc5 100644 --- a/kconfigtest.py +++ b/kconfigtest.py @@ -503,6 +503,19 @@ def run_selftests(): "get_defconfig_filename() should return the existent file " "Kconfiglib/tests/defconfig_2") + # + # Misc. minor APIs + # + + c = kconfiglib.Config("Kconfiglib/tests/Kmisc") + + print "Testing is_optional()..." + + verify(not c.get_choices()[0].is_optional(), + "First choice should not be optional") + verify(c.get_choices()[1].is_optional(), + "Second choice should be optional") + # # Object dependencies # -- cgit v1.2.3