MCPcopy Index your code
hub / github.com/python/cpython / test_get_option

Method test_get_option

Lib/test/test_optparse.py:354–360  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

352 "invalid arguments", None, None)
353
354 def test_get_option(self):
355 opt1 = self.parser.get_option("-v")
356 self.assertIsInstance(opt1, Option)
357 self.assertEqual(opt1._short_opts, ["-v", "-n"])
358 self.assertEqual(opt1._long_opts, ["--verbose", "--noisy"])
359 self.assertEqual(opt1.action, "store_true")
360 self.assertEqual(opt1.dest, "verbose")
361
362 def test_get_option_equals(self):
363 opt1 = self.parser.get_option("-v")

Callers

nothing calls this directly

Calls 3

assertIsInstanceMethod · 0.80
get_optionMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected