diff --git a/AUTHORS.rst b/AUTHORS.rst index 47c405f9..62fc5ccd 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -23,3 +23,4 @@ Authors * Zoltan Kozma - https://github.com/kozmaz87 * Francis Niu - https://flniu.github.io * Jannis Leidel - https://github.com/jezdez +* Terence Honles - https://github.com/terencehonles diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 62f77e88..75fd8c5b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,10 @@ Changelog ========= +2.5.2 (2017-04-14) +------------------ +* Fix DoctestItem has no attribute fixturenames (regression from `PR#78`) + 2.5.1 (2017-05-11) ------------------ diff --git a/src/pytest_cov/plugin.py b/src/pytest_cov/plugin.py index 46321d8a..76004271 100644 --- a/src/pytest_cov/plugin.py +++ b/src/pytest_cov/plugin.py @@ -286,7 +286,8 @@ def pytest_runtest_teardown(self, item): @compat.hookwrapper def pytest_runtest_call(self, item): - if item.get_marker("no_cover") or "no_cover" in item.fixturenames: + if (item.get_marker('no_cover') + or 'no_cover' in getattr(item, 'fixturenames', ())): self.cov_controller.pause() yield self.cov_controller.resume()