'Test case for issue 2434: DecodeError on Python 2 when doctest docstring
contains non-ascii characters.'

def test_unicode_doctest_module(self, testdir):

    p = testdir.makepyfile(test_unicode_doctest_module='\n                                                #    -*-    encoding:    utf-8    -*-\n                                                from    __future__    import    unicode_literals\n\n                                                def    fix_bad_unicode(text):\n                                                                \'\'\'\n                                                                                >>>    print(fix_bad_unicode(\'\xc3\x83\xc2\xbanico\'))\n                                                                                \xc3\xbanico\n                                                                \'\'\'\n                                                                return    "\xc3\xbanico"\n                                ')
    result = testdir.runpytest(p, '--doctest-modules')
    result.stdout.fnmatch_lines(['*    1    passed    *'])
