]> granicus.if.org Git - python/commitdiff
Issue #25365: test_pickle now works in threads disabled builds.
authorSerhiy Storchaka <storchaka@gmail.com>
Sat, 10 Oct 2015 17:10:07 +0000 (20:10 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sat, 10 Oct 2015 17:10:07 +0000 (20:10 +0300)
Lib/test/test_pickle.py

index 3d75d65d19c6d3f8fabd9ea974bc25c1e1d7551c..8dc93d2a5bf2e6f0389af41058a640d733bc41b1 100644 (file)
@@ -377,8 +377,9 @@ class CompatPickleTests(unittest.TestCase):
                     self.assertEqual(mapping('exceptions', name),
                                      ('builtins', name))
 
-        import multiprocessing.context
-        for name, exc in get_exceptions(multiprocessing.context):
+    def test_multiprocessing_exceptions(self):
+        module = support.import_module('multiprocessing.context')
+        for name, exc in get_exceptions(module):
             with self.subTest(name):
                 self.assertEqual(reverse_mapping('multiprocessing.context', name),
                                  ('multiprocessing', name))