def test_allow_unicode(self, pytester, config_mode):
        """Test that doctests which output unicode work in all python versions
        tested by pytest when the ALLOW_UNICODE option is used (either in
        the ini file or by an inline comment).
        """
        if config_mode == "ini":
            pytester.makeini(
                """
            [pytest]
            doctest_optionflags = ALLOW_UNICODE
            """
            )
            comment = ""
        else:
            comment = "#doctest: +ALLOW_UNICODE"

        pytester.maketxtfile(
            test_doc=f"""
            >>> b'12'.decode('ascii') {comment}
            '12'
        """
        )
        pytester.makepyfile(
            foo=f"""
            def foo():
              '''
              >>> b'12'.decode('ascii') {comment}
              '12'
              '''
        """
        )
        reprec = pytester.inline_run("--doctest-modules")
        reprec.assertoutcome(passed=2)
Test that doctests which output unicode work in all python versions
        tested by pytest when the ALLOW_UNICODE option is used (either in
        the ini file or by an inline comment).
        
testing/test_doctest.py