diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2021-11-29 14:37:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 14:37:07 +0100 |
commit | cb7ee204b7af0907c3073d6bf8f60a9325bb30e2 (patch) | |
tree | 18f634b877b0ba90c143a965f932ee4828d79a92 /tests/primer/test_primer_external.py | |
parent | 81dda1771759aaacd4d1879f37db6b59e25612c7 (diff) | |
download | pylint-git-cb7ee204b7af0907c3073d6bf8f60a9325bb30e2.tar.gz |
Update ``primer`` tests to own file, separate batches and concurrent runs (#5425)
Diffstat (limited to 'tests/primer/test_primer_external.py')
-rw-r--r-- | tests/primer/test_primer_external.py | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/tests/primer/test_primer_external.py b/tests/primer/test_primer_external.py index a3fb9b66c..12206b0fc 100644 --- a/tests/primer/test_primer_external.py +++ b/tests/primer/test_primer_external.py @@ -24,16 +24,42 @@ def get_packages_to_lint_from_json( return result -PACKAGE_TO_LINT_JSON = Path(__file__).parent / "packages_to_lint.json" -PACKAGES_TO_LINT = get_packages_to_lint_from_json(PACKAGE_TO_LINT_JSON) -"""Dictionary of external packages used during the primer test""" +PACKAGE_TO_LINT_JSON_BATCH_ONE = ( + Path(__file__).parent / "packages_to_lint_batch_one.json" +) +PACKAGES_TO_LINT_BATCH_ONE = get_packages_to_lint_from_json( + PACKAGE_TO_LINT_JSON_BATCH_ONE +) +"""Dictionary of external packages used during the primer test in batch one""" + +PACKAGE_TO_LINT_JSON_BATCH_TWO = ( + Path(__file__).parent / "packages_to_lint_batch_two.json" +) +PACKAGES_TO_LINT_BATCH_TWO = get_packages_to_lint_from_json( + PACKAGE_TO_LINT_JSON_BATCH_TWO +) +"""Dictionary of external packages used during the primer test in batch two""" class TestPrimer: @staticmethod - @pytest.mark.primer_external - @pytest.mark.parametrize("package", PACKAGES_TO_LINT.values(), ids=PACKAGES_TO_LINT) - def test_primer_external_packages_no_crash( + @pytest.mark.primer_external_batch_one + @pytest.mark.parametrize( + "package", PACKAGES_TO_LINT_BATCH_ONE.values(), ids=PACKAGES_TO_LINT_BATCH_ONE + ) + def test_primer_external_packages_no_crash_batch_one( + package: PackageToLint, + caplog: LogCaptureFixture, + ) -> None: + __tracebackhide__ = True # pylint: disable=unused-variable + TestPrimer._primer_test(package, caplog) + + @staticmethod + @pytest.mark.primer_external_batch_two + @pytest.mark.parametrize( + "package", PACKAGES_TO_LINT_BATCH_TWO.values(), ids=PACKAGES_TO_LINT_BATCH_TWO + ) + def test_primer_external_packages_no_crash_batch_two( package: PackageToLint, caplog: LogCaptureFixture, ) -> None: |