Skip to content

Commit 2d94166

Browse files
terencehonlesionelmc
authored andcommitted
fix DoctestItem has no attribute fixturenames (regression from #78)
1 parent 8fd680e commit 2d94166

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

AUTHORS.rst

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Authors
2323
* Zoltan Kozma - https://github.com/kozmaz87
2424
* Francis Niu - https://flniu.github.io
2525
* Jannis Leidel - https://github.com/jezdez
26+
* Terence Honles - https://github.com/terencehonles

CHANGELOG.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
=========
33

4+
2.5.2 (2017-04-14)
5+
------------------
6+
* Fix DoctestItem has no attribute fixturenames (regression from `PR#78`)
7+
48
2.5.1 (2017-05-11)
59
------------------
610

src/pytest_cov/plugin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,8 @@ def pytest_runtest_teardown(self, item):
286286

287287
@compat.hookwrapper
288288
def pytest_runtest_call(self, item):
289-
if item.get_marker("no_cover") or "no_cover" in item.fixturenames:
289+
if (item.get_marker('no_cover')
290+
or 'no_cover' in getattr(item, 'fixturenames', ())):
290291
self.cov_controller.pause()
291292
yield
292293
self.cov_controller.resume()

0 commit comments

Comments
 (0)