summaryrefslogtreecommitdiffhomepage
path: root/tests/doctests
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-08-02 01:32:37 -0300
committerGuido Günther <agx@sigxcpu.org>2017-08-02 10:35:05 -0300
commitdd2093b111bdf069cc989952ac7e8c3781c948cc (patch)
tree5c44ff7ba79979e6060a6b9d70cd038e4c572d00 /tests/doctests
parentfd25d50088f5ca231195123fd511f491ebbb96e2 (diff)
test_buildpackage_rpm: correctly mock False state
This way we don't need to rely on python comparing our tristate to True / False correctly.
Diffstat (limited to 'tests/doctests')
-rw-r--r--tests/doctests/test_Config.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/doctests/test_Config.py b/tests/doctests/test_Config.py
index d985d830..8d6eadb5 100644
--- a/tests/doctests/test_Config.py
+++ b/tests/doctests/test_Config.py
@@ -62,6 +62,15 @@ def test_tristate():
>>> options, args= c.parse_args(['--color=auto'])
>>> options.color
auto
+ >>> options.color.is_off()
+ False
+ >>> c = gbp.config.GbpOptionParser('tristate')
+ >>> c.add_config_file_option(option_name="color", dest="color", type='tristate')
+ >>> options, args= c.parse_args(['--color=off'])
+ >>> options.color
+ off
+ >>> options.color.is_off()
+ True
"""