]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #19134: Make a test in inspect conditional on multiprocessing
authorBrett Cannon <brett@python.org>
Mon, 30 Sep 2013 19:21:09 +0000 (15:21 -0400)
committerBrett Cannon <brett@python.org>
Mon, 30 Sep 2013 19:21:09 +0000 (15:21 -0400)
being available.

Thanks to Remi Pointel for the bug report.

Lib/test/test_inspect.py

index 22c2be861c1f0df96396828ddddf61f6c7da75c3..45b36d22ff9c53d7bb249dd0a5abcef7e3a31ec3 100644 (file)
@@ -13,6 +13,7 @@ import importlib
 from os.path import normcase
 
 from test.support import run_unittest, TESTFN, DirsOnSysPath
+from test.support import multiprocessing as has_multiprocessing
 from test.script_helper import assert_python_ok, assert_python_failure
 from test import inspect_fodder as mod
 from test import inspect_fodder2 as mod2
@@ -2407,6 +2408,8 @@ class TestMain(unittest.TestCase):
         self.assertEqual(lines[:-1], inspect.getsource(module).splitlines())
         self.assertEqual(err, b'')
 
+    @unittest.skipIf(not has_multiprocessing,
+            'multiprocessing required to test __qualname__ for source files')
     def test_qualname_source(self):
         module = importlib.import_module('concurrent.futures')
         member = getattr(module, 'ThreadPoolExecutor')