diff options
author | Armin Rigo <arigo@tunes.org> | 2006-05-28 19:13:17 +0000 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2006-05-28 19:13:17 +0000 |
commit | a3f092751ae5f29957c78a7e86381532629c7fa3 (patch) | |
tree | 27eecd5671e5bbe3654c5630a62d1deb7300e80b /Lib/test/test_optparse.py | |
parent | e9eeab5c0539ede73b52f9df9bd4da8346c91741 (diff) | |
download | cpython-git-a3f092751ae5f29957c78a7e86381532629c7fa3.tar.gz |
("Forward-port" of r46506)
Remove various dependencies on dictionary order in the standard library
tests, and one (clearly an oversight, potentially critical) in the
standard library itself - base64.py.
Remaining open issues:
* test_extcall is an output test, messy to make robust
* tarfile.py has a potential bug here, but I'm not familiar
enough with this code. Filed in as SF bug #1496501.
* urllib2.HTTPPasswordMgr() returns a random result if there is more
than one matching root path. I'm asking python-dev for
clarification...
Diffstat (limited to 'Lib/test/test_optparse.py')
-rw-r--r-- | Lib/test/test_optparse.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index 991c06d447..79df9066e2 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -230,7 +230,7 @@ class TestOptionChecks(BaseTest): def test_attr_invalid(self): self.assertOptionError( - "option -b: invalid keyword arguments: foo, bar", + "option -b: invalid keyword arguments: bar, foo", ["-b"], {'foo': None, 'bar': None}) def test_action_invalid(self): @@ -718,9 +718,8 @@ class TestStandard(BaseTest): def test_ambiguous_option(self): self.parser.add_option("--foz", action="store", type="string", dest="foo") - possibilities = ", ".join({"--foz": None, "--foo": None}.keys()) self.assertParseFail(["--f=bar"], - "ambiguous option: --f (%s?)" % possibilities) + "ambiguous option: --f (--foo, --foz?)") def test_short_and_long_option_split(self): @@ -1537,10 +1536,9 @@ class TestMatchAbbrev(BaseTest): def test_match_abbrev_error(self): s = "--f" wordmap = {"--foz": None, "--foo": None, "--fie": None} - possibilities = ", ".join(wordmap.keys()) self.assertRaises( _match_abbrev, (s, wordmap), None, - BadOptionError, "ambiguous option: --f (%s?)" % possibilities) + BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)") class TestParseNumber(BaseTest): |