summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericalias.py
diff options
context:
space:
mode:
authorSaiyang Gou <gousaiyang@163.com>2020-10-09 20:00:15 (GMT)
committerGitHub <noreply@github.com>2020-10-09 20:00:15 (GMT)
commitb2c0a43699bd9023a69e3fa554f5488a2e17e278 (patch)
tree94c494fe3b164247a63499290e4729e7ccda6ffa /Lib/test/test_genericalias.py
parenteb38c6b7aa35d3003ec0958533421902d19ce408 (diff)
downloadcpython-b2c0a43699bd9023a69e3fa554f5488a2e17e278.zip
cpython-b2c0a43699bd9023a69e3fa554f5488a2e17e278.tar.gz
cpython-b2c0a43699bd9023a69e3fa554f5488a2e17e278.tar.bz2
bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619)
There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names. Automerge-Triggered-By: @gvanrossum
Diffstat (limited to 'Lib/test/test_genericalias.py')
-rw-r--r--Lib/test/test_genericalias.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_genericalias.py b/Lib/test/test_genericalias.py
index 643fffc..2979cfb 100644
--- a/Lib/test/test_genericalias.py
+++ b/Lib/test/test_genericalias.py
@@ -29,7 +29,7 @@ try:
except ImportError:
# multiprocessing.shared_memory is not available on e.g. Android
ShareableList = None
-from multiprocessing.queues import SimpleQueue
+from multiprocessing.queues import SimpleQueue as MPSimpleQueue
from os import DirEntry
from re import Pattern, Match
from types import GenericAlias, MappingProxyType, AsyncGeneratorType
@@ -81,7 +81,7 @@ class BaseTest(unittest.TestCase):
SplitResult, ParseResult,
ValueProxy, ApplyResult,
WeakSet, ReferenceType, ref,
- ShareableList, SimpleQueue,
+ ShareableList, MPSimpleQueue,
Future, _WorkItem,
Morsel]
if ctypes is not None: