'integration test for issue #995.'

def test_traceback_filter_error_during_fixture_collection(self, testdir):

    testdir.makepyfile('\n                                                import    pytest\n\n                                                def    fail_me(func):\n                                                                ns    =    {}\n                                                                exec(\'def    w():    raise    ValueError("fail    me")\',    ns)\n                                                                return    ns[\'w\']\n\n                                                @pytest.fixture(scope=\'class\')\n                                                @fail_me\n                                                def    fail_fixture():\n                                                                pass\n\n                                                def    test_failing_fixture(fail_fixture):\n                                                            pass\n                                ')
    result = testdir.runpytest()
    assert (result.ret != 0)
    out = result.stdout.str()
    assert ('INTERNALERROR>' not in out)
    result.stdout.fnmatch_lines(['*ValueError:    fail    me*', '*    1    error    in    *'])
