From 16fd6939a292ef18a2118cc4ac640a3d0f1e1a56 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac <2745737+mdavezac@users.noreply.github.com> Date: Fri, 26 Apr 2019 09:16:03 +0100 Subject: [PATCH 1/3] allow pyflake pluggin to work --- pythonFiles/testing_tools/adapter/pytest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonFiles/testing_tools/adapter/pytest.py b/pythonFiles/testing_tools/adapter/pytest.py index 75c6777bc205..c0a2882c1110 100644 --- a/pythonFiles/testing_tools/adapter/pytest.py +++ b/pythonFiles/testing_tools/adapter/pytest.py @@ -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 @@ -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 From fdb2aa7890f6c080b6eaf85686ac1c794e059186 Mon Sep 17 00:00:00 2001 From: Mayeul d'Avezac <2745737+mdavezac@users.noreply.github.com> Date: Fri, 26 Apr 2019 09:50:50 +0100 Subject: [PATCH 2/3] Adds news for PR 5491 --- news/2 Fixes/5491.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/2 Fixes/5491.md diff --git a/news/2 Fixes/5491.md b/news/2 Fixes/5491.md new file mode 100644 index 000000000000..6c4222e7cc01 --- /dev/null +++ b/news/2 Fixes/5491.md @@ -0,0 +1 @@ +fixes for pytest tests discovery when flake8 pytest plugin is enabled From 2889a5b0e9f5e338b9baee5fe7eba0c2b8eb53fa Mon Sep 17 00:00:00 2001 From: Brett Cannon <54418+brettcannon@users.noreply.github.com> Date: Mon, 29 Apr 2019 08:43:28 +0100 Subject: [PATCH 3/3] Update news/2 Fixes/5491.md Co-Authored-By: mdavezac <2745737+mdavezac@users.noreply.github.com> --- news/2 Fixes/5491.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/news/2 Fixes/5491.md b/news/2 Fixes/5491.md index 6c4222e7cc01..5189b2ad3b19 100644 --- a/news/2 Fixes/5491.md +++ b/news/2 Fixes/5491.md @@ -1 +1,2 @@ -fixes for pytest tests discovery when flake8 pytest plugin is enabled +Fix pytest tests discovery for when flake8 pytest plugin is enabled. +(thanks [Mayeul d'Avezac](https://github.com/mdavezac))