(self)
| 563 | |
| 564 | class TestExpandDefaults(BaseTest): |
| 565 | def setUp(self): |
| 566 | self.parser = OptionParser(prog="test") |
| 567 | self.help_prefix = """\ |
| 568 | Usage: test [options] |
| 569 | |
| 570 | Options: |
| 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", |
nothing calls this directly
no test coverage detected