diff --git a/news/2 Fixes/4099.md b/news/2 Fixes/4099.md new file mode 100644 index 000000000000..f67c4c195d7f --- /dev/null +++ b/news/2 Fixes/4099.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 diff --git a/src/client/unittests/pytest/services/parserService.ts b/src/client/unittests/pytest/services/parserService.ts index 1b795ff6fd50..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 { @@ -38,7 +37,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 +148,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 +169,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 +185,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 +194,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 +224,37 @@ export class TestsParser implements ITestsParser { } } - /* Sample output from pytest --collect-only - - - - - - - - - - - - - - - - - - - +/* Sample output from pytest --collect-only + + + + + + + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - */ + + + + + +*/ 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 =========================" + ] } ];