Return a doctest.OutputChecker subclass that supports some additional options: * ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b'' prefixes (respectively) in string literals. Useful when the same doctest should run in Python 2 and Python 3. * NUMBER to ignore floa
()
| 670 | |
| 671 | |
| 672 | def _get_checker() -> "doctest.OutputChecker": |
| 673 | """Return a doctest.OutputChecker subclass that supports some |
| 674 | additional options: |
| 675 | |
| 676 | * ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b'' |
| 677 | prefixes (respectively) in string literals. Useful when the same |
| 678 | doctest should run in Python 2 and Python 3. |
| 679 | |
| 680 | * NUMBER to ignore floating-point differences smaller than the |
| 681 | precision of the literal number in the doctest. |
| 682 | |
| 683 | An inner class is used to avoid importing "doctest" at the module |
| 684 | level. |
| 685 | """ |
| 686 | global CHECKER_CLASS |
| 687 | if CHECKER_CLASS is None: |
| 688 | CHECKER_CLASS = _init_checker_class() |
| 689 | return CHECKER_CLASS() |
| 690 | |
| 691 | |
| 692 | def _get_allow_unicode_flag() -> int: |
no test coverage detected