Message241097
> I've turned ash's test program into a bunch of test cases against
> Python 3.5 trunk. Is it worth committing them?
Yeah, probably. Review comments...
+ try:
+ self.parser.error(RUSSIAN_TEXT)
+ except InterceptedError:
+ pass
Why not self.assertRaises()?
Also, when I run the test on its own, it prints
'''
Usage: regrtest.py [options]
regrtest.py: error: Русский текст --unknown
'''
to stderr. Probably need to fiddle with sys.stderr to fix that. Blech.
Finally:
+ try:
+ import optparse
+ old_gettext = optparse._
+ optparse._ = dummy_gettext
+
+ try:
+ OptionParser().parse_args(["--unknown"])
+ except SystemExit:
+ pass
+ finally:
+ optparse._ = old_gettext
This is a lot easier with mock. |
|
Date |
User |
Action |
Args |
2015-04-15 13:15:10 | gward | set | recipients:
+ gward, loewis, akuchling, bethard, ivilata, vstinner, aronacher, ezio.melotti, ash, eric.araujo, sampablokuper |
2015-04-15 13:15:10 | gward | set | messageid: <1429103710.18.0.412244970854.issue2931@psf.upfronthosting.co.za> |
2015-04-15 13:15:10 | gward | link | issue2931 messages |
2015-04-15 13:15:09 | gward | create | |
|