MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_print_unicode_value

Method test_print_unicode_value

testing/test_doctest.py:765–779  ·  view source on GitHub ↗

Test case for issue 3583: Printing Unicode in doctest under Python 2.7 doesn't work

(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

763 result.stdout.fnmatch_lines(["* 1 passed *"])
764
765 def test_print_unicode_value(self, pytester: Pytester):
766 """
767 Test case for issue 3583: Printing Unicode in doctest under Python 2.7
768 doesn't work
769 """
770 p = pytester.maketxtfile(
771 test_print_unicode_value=r"""
772 Here is a doctest::
773
774 >>> print('\xE5\xE9\xEE\xF8\xFC')
775 åéîøü
776 """
777 )
778 result = pytester.runpytest(p)
779 result.stdout.fnmatch_lines(["* 1 passed *"])
780
781 def test_reportinfo(self, pytester: Pytester):
782 """Make sure that DoctestItem.reportinfo() returns lineno."""

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
maketxtfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected