Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/2 Fixes/5491.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix pytest tests discovery for when flake8 pytest plugin is enabled.
(thanks [Mayeul d'Avezac](https://github.com/mdavezac))
4 changes: 2 additions & 2 deletions pythonFiles/testing_tools/adapter/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _parse_item(item, _normcase, _pathsep):
testfunc = '.'.join(suites) + '.' + funcname
else:
testfunc = funcname
elif kind == 'doctest':
else:
testfunc = None
funcname = None

Expand Down Expand Up @@ -397,7 +397,7 @@ def _get_item_kind(item):
return 'function', False
elif itemtype == 'TestCaseFunction':
return 'function', True
elif item.hasattr('function'):
elif hasattr(item, 'function'):
return 'function', False
else:
return None, False
Expand Down