diff options
author | Guido van Rossum <guido@python.org> | 2007-07-09 10:08:42 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-07-09 10:08:42 (GMT) |
commit | b4e87e379219afd6ef1a0fba400275fa22180c63 (patch) | |
tree | 162afe1db7a757d1c21745fd13ee766d6c1525f1 | |
parent | a222e4cc71d7f4f6479e3be4f015673dafb078e3 (diff) | |
download | cpython-b4e87e379219afd6ef1a0fba400275fa22180c63.zip cpython-b4e87e379219afd6ef1a0fba400275fa22180c63.tar.gz cpython-b4e87e379219afd6ef1a0fba400275fa22180c63.tar.bz2 |
Make test_optparse pass.
-rw-r--r-- | Lib/test/test_optparse.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index b196ec9..2bae0a6 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -1463,10 +1463,6 @@ class TestHelp(BaseTest): os.environ['COLUMNS'] = orig_columns def assertHelpEquals(self, expected_output): - if isinstance(expected_output, unicode): - encoding = self.parser._get_encoding(sys.stdout) - expected_output = expected_output.encode(encoding, "replace") - save_argv = sys.argv[:] try: # Make optparse believe bar.py is being executed. @@ -1595,7 +1591,7 @@ class TestParseNumber(BaseTest): self.assertRaises( _parse_num, ("0xOoops", int), {}, ValueError, - re.compile(r"invalid literal for int().*: '?0xOoops'?")) + re.compile(r"invalid literal for int().*: s?'?0xOoops'?")) def test_parse_num_ok(self): self.assertEqual(_parse_num("0", int), 0) |