def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
python类_match_abbrev()的实例源码
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")
def test_match_abbrev(self):
self.assertEqual(_match_abbrev("--f",
{"--foz": None,
"--foo": None,
"--fie": None,
"--f": None}),
"--f")
def test_match_abbrev_error(self):
s = "--f"
wordmap = {"--foz": None, "--foo": None, "--fie": None}
self.assertRaises(
_match_abbrev, (s, wordmap), None,
BadOptionError, "ambiguous option: --f (--fie, --foo, --foz?)")