#9161: add test for the bug fixed by r82581.

Patch by Michael Johnson.
This commit is contained in:
R David Murray 2012-08-13 22:04:30 -04:00
parent bc77d3690b
commit fe9efc5732
1 changed files with 7 additions and 0 deletions

View File

@ -769,6 +769,13 @@ class TestStandard(BaseTest):
self.assertParseFail(["-test"], self.assertParseFail(["-test"],
"no such option: -e") "no such option: -e")
def test_flag_accepts_unicode(self):
try:
self.parser.add_option(u"-u", u"--unicode")
self.parser.parse_args()
except TypeError:
self.fail("Failed parsing flag passed to add_option() as unicode.")
class TestBool(BaseTest): class TestBool(BaseTest):
def setUp(self): def setUp(self):
options = [make_option("-v", options = [make_option("-v",