@pytest.mark.parametrize('scope', SCOPES)
@pytest.mark.parametrize('autouse', [True, False])
@pytest.mark.parametrize('use_fixture_in_doctest', [True, False])
def test_fixture_module_doctest_scopes(self, testdir, scope, autouse, use_fixture_in_doctest):
    'Test that auto-use fixtures work properly with doctest files.\n        See #1057 and #1100.\n        '
    testdir.makeconftest('\n            import pytest\n\n            @pytest.fixture(autouse={autouse}, scope="{scope}")\n            def auto(request):\n                return 99\n        '.format(scope=scope, autouse=autouse))
    if use_fixture_in_doctest:
        testdir.maketxtfile(test_doc="\n                >>> getfixture('auto')\n                99\n            ")
    else:
        testdir.maketxtfile(test_doc='\n                >>> 1 + 1\n                2\n            ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.no_fnmatch_line('*FAILURES*')
    result.stdout.fnmatch_lines(['*=== 1 passed in *'])
Test that auto-use fixtures work properly with doctest files.
See #1057 and #1100.
@pytest.mark.parametrize('scope', SCOPES)
@pytest.mark.parametrize('autouse', [True, False])
@pytest.mark.parametrize('use_fixture_in_doctest', [True, False])
def test_fixture_module_doctest_scopes(self, testdir, scope, autouse, use_fixture_in_doctest):
    'Test that auto-use fixtures work properly with doctest files.\n        See #1057 and #1100.\n        '
    testdir.makeconftest('\n            import pytest\n\n            @pytest.fixture(autouse={autouse}, scope="{scope}")\n            def auto(request):\n                return 99\n        '.format(scope=scope, autouse=autouse))
    if use_fixture_in_doctest:
        testdir.maketxtfile(test_doc="\n                >>> getfixture('auto')\n                99\n            ")
    else:
        testdir.maketxtfile(test_doc='\n                >>> 1 + 1\n                2\n            ')
    result = testdir.runpytest('--doctest-modules')
    result.stdout.no_fnmatch_line('*FAILURES*')
    result.stdout.fnmatch_lines(['*=== 1 passed in *'])