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

Method setUp

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

Source from the content-addressed store, hash-verified

563
564class TestExpandDefaults(BaseTest):
565 def setUp(self):
566 self.parser = OptionParser(prog="test")
567 self.help_prefix = """\
568Usage: test [options]
569
570Options:
571 -h, --help show this help message and exit
572"""
573 self.file_help = "read from FILE [default: %default]"
574 self.expected_help_file = self.help_prefix + \
575 " -f FILE, --file=FILE read from FILE [default: foo.txt]\n"
576 self.expected_help_none = self.help_prefix + \
577 " -f FILE, --file=FILE read from FILE [default: none]\n"
578
579 def test_option_default(self):
580 self.parser.add_option("-f", "--file",

Callers

nothing calls this directly

Calls 1

OptionParserClass · 0.90

Tested by

no test coverage detected