Fix internal error with docstrings containing non-ascii characters.
(self, pytester: Pytester)
| 675 | reprec.assertoutcome(failed=1, passed=0) |
| 676 | |
| 677 | def test_contains_unicode(self, pytester: Pytester): |
| 678 | """Fix internal error with docstrings containing non-ascii characters.""" |
| 679 | pytester.makepyfile( |
| 680 | '''\ |
| 681 | def foo(): |
| 682 | """ |
| 683 | >>> name = 'с' # not letter 'c' but instead Cyrillic 's'. |
| 684 | 'anything' |
| 685 | """ |
| 686 | ''' |
| 687 | ) |
| 688 | result = pytester.runpytest("--doctest-modules") |
| 689 | result.stdout.fnmatch_lines(["Got nothing", "* 1 failed in*"]) |
| 690 | |
| 691 | def test_ignore_import_errors_on_doctest(self, pytester: Pytester): |
| 692 | p = pytester.makepyfile( |
nothing calls this directly
no test coverage detected