diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-09-25 17:19:09 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-09-25 18:21:34 +0200 |
| commit | fe17f546b5cd5fd8b9df7d53856efd7b207faa0e (patch) | |
| tree | e10b2849a84875a22e78af43464af4656295249a /tests | |
| parent | a967d280acc35c5c783ac14dceadb2a79d06e8d9 (diff) | |
Don't set defaults that will always be overwritten
The constructors previously defaulted all properties. This is dead code
for properties that are always set on items from outside during parsing,
and obfuscates the code flow and wastes time. Instead, just mention
other properties that exist in comments in the constructors.
Also add test cases for missing and empty 'choice' help texts. Removing
the default 'self._help = None' assignment in Choice.__init__() wasn't
caught by the selftests.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Ktext | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/Ktext b/tests/Ktext index 599cd36..3440c3c 100644 --- a/tests/Ktext +++ b/tests/Ktext @@ -80,11 +80,21 @@ endif config NO_HELP bool +choice NO_HELP_CHOICE +config FOO +endchoice + config EMPTY_HELP bool help config DUMMY +choice EMPTY_HELP_CHOICE + bool + help +config DUMMY2 +endchoice + config S bool help |
