@pytest.mark.parametrize('scope', SCOPES)
def test_namespace_doctestfile(self, testdir, scope):
    '\n        Check that inserting something into the namespace works in a\n        simple text file doctest\n        '
    testdir.makeconftest('\n            import pytest\n            import contextlib\n\n            @pytest.fixture(autouse=True, scope="{scope}")\n            def add_contextlib(doctest_namespace):\n                doctest_namespace[\'cl\'] = contextlib\n        '.format(scope=scope))
    p = testdir.maketxtfile('\n            >>> print(cl.__name__)\n            contextlib\n        ')
    reprec = testdir.inline_run(p)
    reprec.assertoutcome(passed=1)
Check that inserting something into the namespace works in a
simple text file doctest
@pytest.mark.parametrize('scope', SCOPES)
def test_namespace_doctestfile(self, testdir, scope):
    '\n        Check that inserting something into the namespace works in a\n        simple text file doctest\n        '
    testdir.makeconftest('\n            import pytest\n            import contextlib\n\n            @pytest.fixture(autouse=True, scope="{scope}")\n            def add_contextlib(doctest_namespace):\n                doctest_namespace[\'cl\'] = contextlib\n        '.format(scope=scope))
    p = testdir.maketxtfile('\n            >>> print(cl.__name__)\n            contextlib\n        ')
    reprec = testdir.inline_run(p)
    reprec.assertoutcome(passed=1)