Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

detection of option-as-value doesn't work with store_or_None options #200

Open
boegel opened this issue Oct 12, 2015 · 0 comments
Open

detection of option-as-value doesn't work with store_or_None options #200

boegel opened this issue Oct 12, 2015 · 0 comments
Assignees

Comments

@boegel
Copy link
Member

boegel commented Oct 12, 2015

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants