Skip to content

Commit

Permalink
fix DoctestItem has no attribute fixturenames (regression from #78)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles authored and ionelmc committed Sep 3, 2018
1 parent 8fd680e commit 2d94166
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.rst
Expand Up @@ -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
4 changes: 4 additions & 0 deletions 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)
------------------

Expand Down
3 changes: 2 additions & 1 deletion src/pytest_cov/plugin.py
Expand Up @@ -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()
Expand Down

0 comments on commit 2d94166

Please sign in to comment.