detection of option-as-value doesn't work with store_or_None options
boegel opened this issue · 0 comments
boegel commented
adding an extra test case to the existing test_option_as_value
value demonstrates this:
diff --git a/test/generaloption.py b/test/generaloption.py
index 76f0bb2..73fdd47 100644
--- a/test/generaloption.py
+++ b/test/generaloption.py
@@ -899,6 +899,11 @@ debug=1
self._match_testoption1_sysexit(['--store', '--foo', '--nosuchoptiondefinedfoobar'],
"Value '--foo' starts with a '-'")
+ # test with store_or_None option
+ self._match_testoption1_sysexit(['--ext-pathliststorenone', 'b'],
+ "'-b' is a valid option")
+
+
def suite():
""" returns all the testcases in this module """
return TestLoader().loadTestsFromTestCase(GeneralOptionTest)
@stdweird: for some reason unclear to me is_value_a_commandline_option
gets ()
as value for th value
parameter rather than the actual value being passed (b
in this case), so the option-as-value
goes undetected; however b
does end up being assigned as the value for this option...