summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch')
-rw-r--r--meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch b/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch
new file mode 100644
index 0000000000..a7637a5ca6
--- /dev/null
+++ b/meta-openembedded/meta-python/recipes-devtools/python/python3-pylint/0001-pylint-remove-plugin-pickle-test.patch
@@ -0,0 +1,53 @@
+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
+