/usr/lib/python2.7/dist-packages/pytest_cov/compat.py is in python-pytest-cov 2.5.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import pytest
StringIO # pyflakes, this is for re-export
if hasattr(pytest, 'hookimpl'):
hookwrapper = pytest.hookimpl(hookwrapper=True)
else:
hookwrapper = pytest.mark.hookwrapper
class SessionWrapper(object):
def __init__(self, session):
self._session = session
if hasattr(session, 'testsfailed'):
self._attr = 'testsfailed'
else:
self._attr = '_testsfailed'
@property
def testsfailed(self):
return getattr(self._session, self._attr)
@testsfailed.setter
def testsfailed(self, value):
setattr(self._session, self._attr, value)
|