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

Method setUp

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

Source from the content-addressed store, hash-verified

1368
1369class TestConflictOverride(BaseTest):
1370 def setUp(self):
1371 self.parser = InterceptingOptionParser(usage=SUPPRESS_USAGE)
1372 self.parser.set_conflict_handler("resolve")
1373 self.parser.add_option("-n", "--dry-run",
1374 action="store_true", dest="dry_run",
1375 help="don't do anything")
1376 self.parser.add_option("--dry-run", "-n",
1377 action="store_const", const=42, dest="dry_run",
1378 help="dry run mode")
1379
1380 def test_conflict_override_opts(self):
1381 opt = self.parser.get_option("--dry-run")

Callers

nothing calls this directly

Calls 3

set_conflict_handlerMethod · 0.80
add_optionMethod · 0.45

Tested by

no test coverage detected