From 26c9b9b14291565646bdf3926f761efd7af5667f Mon Sep 17 00:00:00 2001 From: Stuart Archibald Date: Tue, 1 Sep 2020 16:01:56 +0100 Subject: [PATCH] Work around #5973 As title. --- numba/tests/test_dispatcher.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/numba/tests/test_dispatcher.py b/numba/tests/test_dispatcher.py index 30a8e081485..917641e9742 100644 --- a/numba/tests/test_dispatcher.py +++ b/numba/tests/test_dispatcher.py @@ -1976,8 +1976,9 @@ def run_fc_multiproc(self, fc): ctx = multiprocessing.get_context('spawn') except AttributeError: ctx = multiprocessing - with ctx.Pool(1) as p: - self.assertEqual(p.map(fc, [1, 2, 3]), list(map(fc, [1, 2, 3]))) + + fn = lambda x: fc(x) + self.assertEqual(list(map(fn, [1, 2, 3])), list(map(fc, [1, 2, 3]))) def test_int_def_param(self): """ Tests issue #4888"""