]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)
authorVictor Stinner <vstinner@redhat.com>
Fri, 30 Nov 2018 17:30:09 +0000 (18:30 +0100)
committerGitHub <noreply@github.com>
Fri, 30 Nov 2018 17:30:09 +0000 (18:30 +0100)
'here' variable is no longer needed.

Lib/test/test_asyncio/utils.py

index 7084edfeca93197bc15ddb8a24b67c5fc8c00bb6..8b23b0175076c1551dcf70408d74e9097f83c85d 100644 (file)
@@ -156,14 +156,8 @@ class SSLWSGIServerMixin:
         # contains the ssl key and certificate files) differs
         # between the stdlib and stand-alone asyncio.
         # Prefer our own if we can find it.
-        here = os.path.join(os.path.dirname(__file__), '..', 'tests')
-        if not os.path.isdir(here):
-            here = os.path.join(os.path.dirname(os.__file__),
-                                'test', 'test_asyncio')
-        keyfile = os.path.join(here, ONLYKEY)
-        certfile = os.path.join(here, ONLYCERT)
         context = ssl.SSLContext()
-        context.load_cert_chain(certfile, keyfile)
+        context.load_cert_chain(ONLYCERT, ONLYKEY)
 
         ssock = context.wrap_socket(request, server_side=True)
         try: