A unittest suite for one or more doctest files. The path to each doctest file is given as a string; the interpretation of that string depends on the keyword argument "module_relative". A number of options may be provided as keyword arguments: module_relative If
(*paths, **kw)
| 2479 | return DocFileCase(test, **options) |
| 2480 | |
| 2481 | def DocFileSuite(*paths, **kw): |
| 2482 | """A unittest suite for one or more doctest files. |
| 2483 | |
| 2484 | The path to each doctest file is given as a string; the |
| 2485 | interpretation of that string depends on the keyword argument |
| 2486 | "module_relative". |
| 2487 | |
| 2488 | A number of options may be provided as keyword arguments: |
| 2489 | |
| 2490 | module_relative |
| 2491 | If "module_relative" is True, then the given file paths are |
| 2492 | interpreted as os-independent module-relative paths. By |
| 2493 | default, these paths are relative to the calling module's |
| 2494 | directory; but if the "package" argument is specified, then |
| 2495 | they are relative to that package. To ensure os-independence, |
| 2496 | "filename" should use "/" characters to separate path |
| 2497 | segments, and may not be an absolute path (i.e., it may not |
| 2498 | begin with "/"). |
| 2499 | |
| 2500 | If "module_relative" is False, then the given file paths are |
| 2501 | interpreted as os-specific paths. These paths may be absolute |
| 2502 | or relative (to the current working directory). |
| 2503 | |
| 2504 | package |
| 2505 | A Python package or the name of a Python package whose directory |
| 2506 | should be used as the base directory for module relative paths. |
| 2507 | If "package" is not specified, then the calling module's |
| 2508 | directory is used as the base directory for module relative |
| 2509 | filenames. It is an error to specify "package" if |
| 2510 | "module_relative" is False. |
| 2511 | |
| 2512 | setUp |
| 2513 | A set-up function. This is called before running the |
| 2514 | tests in each file. The setUp function will be passed a DocTest |
| 2515 | object. The setUp function can access the test globals as the |
| 2516 | globs attribute of the test passed. |
| 2517 | |
| 2518 | tearDown |
| 2519 | A tear-down function. This is called after running the |
| 2520 | tests in each file. The tearDown function will be passed a DocTest |
| 2521 | object. The tearDown function can access the test globals as the |
| 2522 | globs attribute of the test passed. |
| 2523 | |
| 2524 | globs |
| 2525 | A dictionary containing initial global variables for the tests. |
| 2526 | |
| 2527 | optionflags |
| 2528 | A set of doctest option flags expressed as an integer. |
| 2529 | |
| 2530 | parser |
| 2531 | A DocTestParser (or subclass) that should be used to extract |
| 2532 | tests from the files. |
| 2533 | |
| 2534 | encoding |
| 2535 | An encoding that will be used to convert the files to unicode. |
| 2536 | """ |
| 2537 | suite = _DocTestSuite() |
| 2538 |
nothing calls this directly
no test coverage detected