@pytest.mark.parametrize('config_mode', ['ini', 'comment'])
def test_allow_bytes(self, testdir, config_mode):
    'Test that doctests which output bytes work in all python versions\n        tested by pytest when the ALLOW_BYTES option is used (either in\n        the ini file or by an inline comment)(#1287).\n        '
    if (config_mode == 'ini'):
        testdir.makeini('\n            [pytest]\n            doctest_optionflags = ALLOW_BYTES\n            ')
        comment = ''
    else:
        comment = '#doctest: +ALLOW_BYTES'
    testdir.maketxtfile(test_doc="\n            >>> b'foo'  {comment}\n            'foo'\n        ".format(comment=comment))
    testdir.makepyfile(foo="\n            def foo():\n              '''\n              >>> b'foo'  {comment}\n              'foo'\n              '''\n        ".format(comment=comment))
    reprec = testdir.inline_run('--doctest-modules')
    reprec.assertoutcome(passed=2)
Test that doctests which output bytes work in all python versions
tested by pytest when the ALLOW_BYTES option is used (either in
the ini file or by an inline comment)(#1287).
@pytest.mark.parametrize('config_mode', ['ini', 'comment'])
def test_allow_bytes(self, testdir, config_mode):
    'Test that doctests which output bytes work in all python versions\n        tested by pytest when the ALLOW_BYTES option is used (either in\n        the ini file or by an inline comment)(#1287).\n        '
    if (config_mode == 'ini'):
        testdir.makeini('\n            [pytest]\n            doctest_optionflags = ALLOW_BYTES\n            ')
        comment = 
    else:
        comment = '#doctest: +ALLOW_BYTES'
    testdir.maketxtfile(test_doc="\n            >>> b'foo'  {comment}\n            'foo'\n        ".format(comment=comment))
    testdir.makepyfile(foo="\n            def foo():\n              '\n              >>> b'foo'  {comment}\n              'foo'\n              '\n        ".format(comment=comment))
    reprec = testdir.inline_run('--doctest-modules')
    reprec.assertoutcome(passed=2)