From 9a94d0f267077f1fc93f376ee2ca5fa2d4cedd2e Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Tue, 22 Jan 2019 20:33:50 -0800 Subject: [PATCH 1/4] Update pytest parser to handle pytest 4.0 through pytest 4.1 For #3911 - Handles stdout produced by pytest in the 4.0 and 4.1 series --- .../pytest/services/parserService.ts | 98 +++++++++++-------- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a/src/client/unittests/pytest/services/parserService.ts b/src/client/unittests/pytest/services/parserService.ts index 1b795ff6fd50..9552f25e1904 100644 --- a/src/client/unittests/pytest/services/parserService.ts +++ b/src/client/unittests/pytest/services/parserService.ts @@ -38,7 +38,7 @@ export class TestsParser implements ITestsParser { const trimmedLine: string = line.trim(); - if (trimmedLine.startsWith('').trimQuotes(); let packageName: string = path.normalize(packagePath); const tmpRoot: string = path.normalize(rootDir); @@ -149,10 +149,11 @@ export class TestsParser implements ITestsParser { lines.forEach(line => { const trimmedLine = line.trim(); - let name: string = extractBetweenDelimiters(trimmedLine, DELIMITER, DELIMITER); + let name: string = ''; const indent = line.indexOf('<'); - if (trimmedLine.startsWith('').trimQuotes(); if (packagePrefix && packagePrefix.length > 0) { name = packagePrefix.concat('/', name); } @@ -169,8 +170,15 @@ export class TestsParser implements ITestsParser { const parentNode = this.findParentOfCurrentItem(indent, parentNodes); - if (parentNode && trimmedLine.startsWith(''); + } else { + name = extractBetweenDelimiters(trimmedLine, ''); + } + name = name.trimQuotes(); + const rawName = `${parentNode!.item.nameToRun}::${name}`; const xmlName = `${parentNode!.item.xmlName}.${name}`; const testSuite: TestSuite = { name: name, nameToRun: rawName, functions: [], suites: [], isUnitTest: isUnitTest, isInstance: false, xmlName: xmlName, time: 0 }; @@ -178,7 +186,8 @@ export class TestsParser implements ITestsParser { parentNodes.push({ indent: indent, item: testSuite }); return; } - if (parentNode && trimmedLine.startsWith('').trimQuotes(); // tslint:disable-next-line:prefer-type-cast const suite = (parentNode!.item as TestSuite); // suite.rawName = suite.rawName + '::()'; @@ -186,7 +195,14 @@ export class TestsParser implements ITestsParser { suite.isInstance = true; return; } - if (parentNode && trimmedLine.startsWith(''); + } else { + name = extractBetweenDelimiters(trimmedLine, ''); + } + name = name.trimQuotes(); + const rawName = `${parentNode!.item.nameToRun}::${name}`; const fn: TestFunction = { name: name, nameToRun: rawName, time: 0 }; parentNode!.item.functions.push(fn); @@ -209,37 +225,37 @@ export class TestsParser implements ITestsParser { } } - /* Sample output from pytest --collect-only - - - - - - - - - - - - - - - - - - - +/* Sample output from pytest --collect-only + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - */ + + + + + +*/ From 9f1767deb9f5b94c6eb1a912f11e9d32a75b1e87 Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Tue, 22 Jan 2019 20:46:27 -0800 Subject: [PATCH 2/4] news --- news/2 Fixes/3911.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/2 Fixes/3911.md diff --git a/news/2 Fixes/3911.md b/news/2 Fixes/3911.md new file mode 100644 index 000000000000..f67c4c195d7f --- /dev/null +++ b/news/2 Fixes/3911.md @@ -0,0 +1 @@ +Handle stdout changes with updates to pytest 4.1.x series (without breaking 4.0.x series parsing). \ No newline at end of file From 844d939909aabd0940430f213c06ed6cd30867f6 Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Tue, 22 Jan 2019 21:12:52 -0800 Subject: [PATCH 3/4] Hygiene --- src/client/unittests/pytest/services/parserService.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/client/unittests/pytest/services/parserService.ts b/src/client/unittests/pytest/services/parserService.ts index 9552f25e1904..6e551152c0fb 100644 --- a/src/client/unittests/pytest/services/parserService.ts +++ b/src/client/unittests/pytest/services/parserService.ts @@ -4,11 +4,10 @@ import { inject, injectable } from 'inversify'; import * as os from 'os'; import * as path from 'path'; +import '../../../common/extensions'; import { convertFileToPackage, extractBetweenDelimiters } from '../../common/testUtils'; import { ITestsHelper, ITestsParser, ParserOptions, TestFile, TestFunction, Tests, TestSuite } from '../../common/types'; -const DELIMITER = '\''; - @injectable() export class TestsParser implements ITestsParser { From b37908cecbca7632855ea144b0abdd618b3c70b5 Mon Sep 17 00:00:00 2001 From: Derek Keeler Date: Tue, 22 Jan 2019 22:22:24 -0800 Subject: [PATCH 4/4] Add tests for pytest v4.1+ - update test labels to match pytest versions - add test data specific to 4.1+ - rename news entry --- news/2 Fixes/{3911.md => 4099.md} | 0 .../pytest/pytest_unittest_parser_data.ts | 735 +++++++++++++++++- 2 files changed, 715 insertions(+), 20 deletions(-) rename news/2 Fixes/{3911.md => 4099.md} (100%) diff --git a/news/2 Fixes/3911.md b/news/2 Fixes/4099.md similarity index 100% rename from news/2 Fixes/3911.md rename to news/2 Fixes/4099.md diff --git a/src/test/unittests/pytest/pytest_unittest_parser_data.ts b/src/test/unittests/pytest/pytest_unittest_parser_data.ts index 73122e9e7f41..7b58ed407690 100644 --- a/src/test/unittests/pytest/pytest_unittest_parser_data.ts +++ b/src/test/unittests/pytest/pytest_unittest_parser_data.ts @@ -62,7 +62,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Non-package source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", rootdir: "/home/user/test/pytest_scenario", @@ -96,6 +96,41 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.18 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Non-package source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "src/test_things.py::test_things_major", + "test/this/is/deep/testing/test_very_deeply.py::test_math_works" + ], + functionCount: 9, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 9 items", + "", + " ", + " ", + "", + " ", + "", + " ", + "", + " ", + "", + " ", + "", + " ", + " ", + "", + " ", + "", + "========================= no tests ran in 0.18 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -125,7 +160,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Non-package source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", rootdir: "/home/user/test/pytest_scenario", @@ -152,6 +187,34 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.03 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Non-package source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "src/test_things.py::test_things_major", + "src/under/test_stuff.py::test_platform" + ], + functionCount: 5, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 5 items", + "", + " ", + " ", + "", + " ", + "", + " ", + "", + " ", + "", + "========================= no tests ran in 0.03 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -181,7 +244,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Non-package source, 2 test modules in root folder and two more in one (direct) subfolder.", rootdir: "/home/user/test/pytest_scenario", @@ -208,6 +271,34 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.12 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Non-package source, 2 test modules in root folder and two more in one (direct) subfolder.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test_things.py::test_things_major", + "under/test_stuff.py::test_platform" + ], + functionCount: 5, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 5 items", + "", + " ", + " ", + "", + " ", + "", + " ", + "", + " ", + "", + "========================= no tests ran in 0.12 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -232,7 +323,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Non-package source, 2 test modules in a subfolder off the root.", rootdir: "/home/user/test/pytest_scenario", @@ -254,6 +345,29 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.05 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Non-package source, 2 test modules in a subfolder off the root.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "under/test_other_stuff.py::test_machine_values", + "under/test_stuff.py::test_platform" + ], + functionCount: 2, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 2 items", + "", + " ", + "", + " ", + "", + "========================= no tests ran in 0.05 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -278,7 +392,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Non-package source, 2 modules at the topmost level.", rootdir: "/home/user/test/pytest_scenario", @@ -300,6 +414,29 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.05 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Non-package source, 2 modules at the topmost level.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test_other_stuff.py::test_machine_values", + "test_stuff.py::test_platform" + ], + functionCount: 2, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 2 items", + "", + " ", + "", + " ", + "", + "========================= no tests ran in 0.05 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -345,7 +482,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Package-based source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", rootdir: "/home/user/test/pytest_scenario", @@ -397,6 +534,59 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.13 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Package-based source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test_basic_root.py::test_basic_major", + "test/test_other_basic.py::test_basic_major_minor_internal", + "test/subdir/under/another/subdir/test_other_basic_sub.py::test_basic_major_minor", + "test/uneven/folders/test_other_basic_uneven.py::test_basic_major_minor_internal_uneven" + ], + functionCount: 16, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 16 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "========================= no tests ran in 0.13 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -435,7 +625,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Package-based source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", rootdir: "/home/user/test/pytest_scenario", @@ -474,6 +664,46 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.07 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Package-based source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test/test_other_basic.py::test_basic_major_minor_internal", + "test/subdir/test_other_basic_sub.py::test_basic_major_minor" + ], + functionCount: 12, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 12 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "========================= no tests ran in 0.07 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -512,7 +742,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Package-based source, 2+ test modules in root folder and two more in one (direct) subfolder.", rootdir: "/home/user/test/pytest_scenario", @@ -551,6 +781,46 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.22 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Package-based source, 2+ test modules in root folder and two more in one (direct) subfolder.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test_other_basic_root.py::test_basic_major_minor_internal", + "test/test_basic_sub.py::test_basic_major", + "test/test_basic_sub.py::test_basic_minor" + ], + functionCount: 12, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 12 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "========================= no tests ran in 0.22 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -591,7 +861,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Package-based source, 2+ test modules in a subfolder off the root.", rootdir: "/home/user/test/pytest_scenario", @@ -631,6 +901,47 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.15 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Package-based source, 2+ test modules in a subfolder off the root.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test/test_basic.py::test_basic_minor", + "test/test_other_basic.py::test_basic_major_minor", + "test/test_other_basic_root.py::test_basic_major_minor", + "test/test_other_basic_sub.py::test_basic_major_minor_internal" + ], + functionCount: 12, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 12 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "========================= no tests ran in 0.15 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.NonWindows, @@ -671,7 +982,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.NonWindows, description: "Package-based source, 2+ modules at the topmost level.", rootdir: "/home/user/test/pytest_scenario", @@ -710,6 +1021,46 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "========================= no tests ran in 0.16 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.NonWindows, + description: "Package-based source, 2+ modules at the topmost level.", + rootdir: "/home/user/test/pytest_scenario", + test_functions: [ + "test_basic.py::test_basic_major", + "test_basic_root.py::test_basic_major", + "test_other_basic_root.py::test_basic_major_minor", + "test_other_basic_sub.py::test_basic_major_minor_internal" + ], + functionCount: 12, + stdout: [ + "============================= test session starts ==============================", + "platform linux -- Python 3.7.0+, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: /home/user/test/pytest_scenario, inifile:", + "collected 12 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "========================= no tests ran in 0.16 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -746,7 +1097,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Package-based source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -785,6 +1136,46 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.42 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Package-based source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "other_tests/test_base_stuff.py::test_do_other_test", + "other_tests/test_base_stuff.py::test_do_test", + "tests/further_tests/test_gimme_5.py::test_gimme_5", + "tests/further_tests/test_multiply.py::test_times_10", + "tests/further_tests/test_multiply.py::test_times_2", + "tests/further_tests/deeper/test_more_multiply.py::test_times_100", + "tests/further_tests/deeper/test_more_multiply.py::test_times_negative_1" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "======================== no tests ran in 0.42 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -821,7 +1212,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Non-package source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -855,6 +1246,41 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.17 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Non-package source, tests throughout a deeper tree, including 2 distinct folder paths at different levels.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "other_tests/test_base_stuff.py::test_do_other_test", + "other_tests/test_base_stuff.py::test_do_test", + "tests/further_tests/test_gimme_5.py::test_gimme_5", + "tests/further_tests/test_multiply.py::test_times_10", + "tests/further_tests/test_multiply.py::test_times_2", + "tests/further_tests/deeper/test_more_multiply.py::test_times_100", + "tests/further_tests/deeper/test_more_multiply.py::test_times_negative_1" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + "", + " ", + "", + " ", + " ", + "", + " ", + " ", + "", + "======================== no tests ran in 0.17 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -891,7 +1317,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Package-based source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -928,6 +1354,44 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.38 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Package-based source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "tests/test_base_stuff.py::test_do_test", + "tests/test_base_stuff.py::test_do_other_test", + "tests/test_gimme_5.py::test_gimme_5", + "tests/further_tests/test_more_multiply.py::test_times_100", + "tests/further_tests/test_more_multiply.py::test_times_negative_1", + "tests/further_tests/test_multiply.py::test_times_10", + "tests/further_tests/test_multiply.py::test_times_2" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "======================== no tests ran in 0.38 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -964,7 +1428,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Non-package source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -998,6 +1462,41 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.20 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Non-package source, 2 test modules in subfolders of root, and 2 more in one (direct) subfolder.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "tests/test_base_stuff.py::test_do_test", + "tests/test_base_stuff.py::test_do_other_test", + "tests/test_gimme_5.py::test_gimme_5", + "tests/further_tests/test_more_multiply.py::test_times_100", + "tests/further_tests/test_more_multiply.py::test_times_negative_1", + "tests/further_tests/test_multiply.py::test_times_10", + "tests/further_tests/test_multiply.py::test_times_2" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + "", + " ", + "", + " ", + " ", + "", + " ", + " ", + "", + "======================== no tests ran in 0.20 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1033,7 +1532,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Package-based source, 2+ test modules in root folder and two more in one (direct) subfolder.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1068,6 +1567,42 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.66 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Package-based source, 2+ test modules in root folder and two more in one (direct) subfolder.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "test_base_stuff.py::test_do_test", + "test_base_stuff.py::test_do_other_test", + "tests/test_multiply.py::test_times_10", + "tests/test_multiply.py::test_times_2", + "tests/test_more_multiply.py::test_times_100", + "tests/test_more_multiply.py::test_times_negative_1" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "======================== no tests ran in 0.66 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1103,7 +1638,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Non-package source, 2+ test modules in root folder and two more in one (direct) subfolder.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1136,6 +1671,40 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.41 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Non-package source, 2+ test modules in root folder and two more in one (direct) subfolder.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "test_base_stuff.py::test_do_test", + "test_base_stuff.py::test_do_other_test", + "tests/test_multiply.py::test_times_10", + "tests/test_multiply.py::test_times_2", + "tests/test_more_multiply.py::test_times_100", + "tests/test_more_multiply.py::test_times_negative_1" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + "", + " ", + "", + " ", + " ", + "", + " ", + " ", + "", + "======================== no tests ran in 0.41 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1172,7 +1741,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Package-based source, 2+ test modules in a subfolder off the root.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1208,6 +1777,43 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.26 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Package-based source, 2+ test modules in a subfolder off the root.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "tests/test_base_stuff.py::test_do_test", + "tests/test_base_stuff.py::test_do_other_test", + "tests/test_gimme_5.py::test_gimme_5", + "tests/test_more_multiply.py::test_times_100", + "tests/test_more_multiply.py::test_times_negative_1", + "tests/test_multiply.py::test_times_10", + "tests/test_multiply.py::test_times_2" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "======================== no tests ran in 0.26 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1244,7 +1850,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = ] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Non-package source, 2+ test modules in a subfolder off the root.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1278,6 +1884,41 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.26 seconds =========================" ] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Non-package source, 2+ test modules in a subfolder off the root.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "tests/test_base_stuff.py::test_do_test", + "tests/test_base_stuff.py::test_do_other_test", + "tests/test_gimme_5.py::test_gimme_5", + "tests/test_more_multiply.py::test_times_100", + "tests/test_more_multiply.py::test_times_negative_1", + "tests/test_multiply.py::test_times_10", + "tests/test_multiply.py::test_times_2" + ], + functionCount: 7, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 7 items", + "", + " ", + " ", + "", + " ", + "", + " ", + " ", + "", + " ", + " ", + "", + "======================== no tests ran in 0.26 seconds =========================" + ] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1305,7 +1946,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.17 seconds ========================="] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Package-based source, 2+ modules at the topmost level.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1331,6 +1972,33 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "", "======================== no tests ran in 0.37 seconds ========================="] }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Package-based source, 2+ modules at the topmost level.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "test_base_stuff.py::test_do_test", + "test_base_stuff.py::test_do_other_test", + "test_multiply.py::test_times_10", + "test_multiply.py::test_times_2" + ], + functionCount: 4, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 4 items", + "", + " ", + " ", + " ", + " ", + " ", + " ", + "", + "======================== no tests ran in 0.37 seconds ========================="] + }, { pytest_version_spec: "< 3.7", platform: PytestDataPlatformType.Windows, @@ -1358,7 +2026,7 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "======================== no tests ran in 0.18 seconds ========================="] }, { - pytest_version_spec: ">= 3.7", + pytest_version_spec: ">= 3.7 < 4.1", platform: PytestDataPlatformType.Windows, description: "Non-package source, 2 modules at the topmost level.", rootdir: "e:\\user\\test\\pytest_scenario", @@ -1383,5 +2051,32 @@ export const pytestScenarioData: PytestDiscoveryScenario[] = "", "======================== no tests ran in 0.36 seconds =========================" ] + }, + { + pytest_version_spec: ">= 4.1", + platform: PytestDataPlatformType.Windows, + description: "Non-package source, 2 modules at the topmost level.", + rootdir: "e:\\user\\test\\pytest_scenario", + test_functions: [ + "test_base_stuff.py::test_do_test", + "test_base_stuff.py::test_do_other_test", + "test_multiply.py::test_times_10", + "test_multiply.py::test_times_2" + ], + functionCount: 4, + stdout: [ + "============================= test session starts =============================", + "platform win32 -- Python 3.7.0, pytest-4.1.0, py-1.6.0, pluggy-0.7.1", + "rootdir: e:\\user\\test\\pytest_scenario, inifile:", + "collected 4 items", + "", + " ", + " ", + "", + " ", + " ", + "", + "======================== no tests ran in 0.36 seconds =========================" + ] } ];