From 94332cba0f0a020f35590f1c2da23a579e3e9f3a Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Thu, 20 Oct 2016 05:10:44 +0000 Subject: [PATCH] Issue #28480: Adjust or skip tests if multithreading is disabled --- Lib/test/test_asyncgen.py | 4 +++- Lib/test/test_logging.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_asyncgen.py b/Lib/test/test_asyncgen.py index 41b1b4f4b48..c24fbea5b09 100644 --- a/Lib/test/test_asyncgen.py +++ b/Lib/test/test_asyncgen.py @@ -1,4 +1,3 @@ -import asyncio import inspect import sys import types @@ -6,6 +5,9 @@ import unittest from unittest import mock +from test.support import import_module +asyncio = import_module("asyncio") + class AwaitException(Exception): pass diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index e45a982dbf7..078a86b359a 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -4304,7 +4304,7 @@ class MiscTestCase(unittest.TestCase): 'logProcesses', 'currentframe', 'PercentStyle', 'StrFormatStyle', 'StringTemplateStyle', 'Filterer', 'PlaceHolder', 'Manager', 'RootLogger', - 'root'} + 'root', 'threading'} support.check__all__(self, logging, blacklist=blacklist)