@pytest.mark.parametrize('   test_string,    encoding', [('foo', 'ascii'), ('öäü', 'latin1'), ('öäü', 'utf-8')])
def test_encoding(self, testdir, test_string, encoding):
    'Test support for doctest_encoding ini option.\n        '
    testdir.makeini('\n            [pytest]\n            doctest_encoding={}\n        '.format(encoding))
    doctest = '\n            >>> "{}"\n            {}\n        '.format(test_string, repr(test_string))
    testdir._makefile('.txt', [doctest], {}, encoding=encoding)
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(['*1 passed*'])
Test support for doctest_encoding ini option.
@pytest.mark.parametrize('   test_string,    encoding', [('foo', 'ascii'), ('öäü', 'latin1'), ('öäü', 'utf-8')])
def test_encoding(self, testdir, test_string, encoding):
    '\n        '
    testdir.makeini('\n            [pytest]\n            doctest_encoding={}\n        '.format(encoding))
    doctest = '\n            >>> "{}"\n            {}\n        '.format(test_string, repr(test_string))
    testdir._makefile('.txt', [doctest], {}, encoding=encoding)
    result = testdir.runpytest()
    result.stdout.fnmatch_lines(['*1 passed*'])