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
()
| 660 | |
| 661 | |
| 662 | def _get_checker() -> doctest.OutputChecker: |
| 663 | """Return a doctest.OutputChecker subclass that supports some |
| 664 | additional options: |
| 665 | |
| 666 | * ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b'' |
| 667 | prefixes (respectively) in string literals. Useful when the same |
| 668 | doctest should run in Python 2 and Python 3. |
| 669 | |
| 670 | * NUMBER to ignore floating-point differences smaller than the |
| 671 | precision of the literal number in the doctest. |
| 672 | |
| 673 | An inner class is used to avoid importing "doctest" at the module |
| 674 | level. |
| 675 | """ |
| 676 | global CHECKER_CLASS |
| 677 | if CHECKER_CLASS is None: |
| 678 | CHECKER_CLASS = _init_checker_class() |
| 679 | return CHECKER_CLASS() |
| 680 | |
| 681 | |
| 682 | def _get_allow_unicode_flag() -> int: |
no test coverage detected