mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-07-19 15:29:08 +02:00

There is one test in the pylint suite involving pickling non-pickleable plugins that fails on target (but not host). Disable this test for ptest runs. Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
From 341e19dd69d847f84859e85cabff5846e7da24c4 Mon Sep 17 00:00:00 2001
|
|
From: Trevor Gamblin <tgamblin@baylibre.com>
|
|
Date: Mon, 15 May 2023 09:26:04 -0400
|
|
Subject: [PATCH] pylint: remove plugin pickle test
|
|
|
|
Upstream-Status: Inappropriate (oe-specific)
|
|
|
|
Upstream uses an assertion in the removed test to state that the test
|
|
needs changing if the plugin loading succeeds. The same failure wasn't
|
|
seen when running the tests on the host with pytest, so disable it by
|
|
removing the test from the suite.
|
|
|
|
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
|
|
---
|
|
tests/test_check_parallel.py | 22 ----------------------
|
|
1 file changed, 22 deletions(-)
|
|
|
|
diff --git a/tests/test_check_parallel.py b/tests/test_check_parallel.py
|
|
index d56502eaf..34fec140f 100644
|
|
--- a/tests/test_check_parallel.py
|
|
+++ b/tests/test_check_parallel.py
|
|
@@ -257,28 +257,6 @@ class TestCheckParallelFramework:
|
|
assert stats.statement == 18
|
|
assert stats.warning == 0
|
|
|
|
- def test_linter_with_unpickleable_plugins_is_pickleable(self) -> None:
|
|
- """The linter needs to be pickle-able in order to be passed between workers"""
|
|
- linter = PyLinter(reporter=Reporter())
|
|
- # We load an extension that we know is not pickle-safe
|
|
- linter.load_plugin_modules(["pylint.extensions.overlapping_exceptions"])
|
|
- try:
|
|
- dill.dumps(linter)
|
|
- raise AssertionError(
|
|
- "Plugins loaded were pickle-safe! This test needs altering"
|
|
- )
|
|
- except (KeyError, TypeError, PickleError, NotImplementedError):
|
|
- pass
|
|
-
|
|
- # And expect this call to make it pickle-able
|
|
- linter.load_plugin_configuration()
|
|
- try:
|
|
- dill.dumps(linter)
|
|
- except KeyError as exc:
|
|
- raise AssertionError(
|
|
- "Cannot pickle linter when using non-pickleable plugin"
|
|
- ) from exc
|
|
-
|
|
def test_worker_check_sequential_checker(self) -> None:
|
|
"""Same as test_worker_check_single_file_no_checkers with SequentialTestChecker."""
|
|
linter = PyLinter(reporter=Reporter())
|
|
--
|
|
2.40.1
|
|
|