| 725 | checker=self.checker) |
| 726 | |
| 727 | def options(self, parser, env=os.environ): |
| 728 | #print "Options for nose plugin:", self.name # dbg |
| 729 | Plugin.options(self, parser, env) |
| 730 | parser.add_option('--ipdoctest-tests', action='store_true', |
| 731 | dest='ipdoctest_tests', |
| 732 | default=env.get('NOSE_IPDOCTEST_TESTS',True), |
| 733 | help="Also look for doctests in test modules. " |
| 734 | "Note that classes, methods and functions should " |
| 735 | "have either doctests or non-doctest tests, " |
| 736 | "not both. [NOSE_IPDOCTEST_TESTS]") |
| 737 | parser.add_option('--ipdoctest-extension', action="append", |
| 738 | dest="ipdoctest_extension", |
| 739 | help="Also look for doctests in files with " |
| 740 | "this extension [NOSE_IPDOCTEST_EXTENSION]") |
| 741 | # Set the default as a list, if given in env; otherwise |
| 742 | # an additional value set on the command line will cause |
| 743 | # an error. |
| 744 | env_setting = env.get('NOSE_IPDOCTEST_EXTENSION') |
| 745 | if env_setting is not None: |
| 746 | parser.set_defaults(ipdoctest_extension=tolist(env_setting)) |
| 747 | |
| 748 | def configure(self, options, config): |
| 749 | #print "Configuring nose plugin:", self.name # dbg |