[Python-checkins] bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)
Victor Stinner
webhook-mailer at python.org
Fri Nov 30 12:30:12 EST 2018
https://github.com/python/cpython/commit/7212148c95947b0fdfcb0c8e37d4357287bdb4bd
commit: 7212148c95947b0fdfcb0c8e37d4357287bdb4bd
branch: master
author: Victor Stinner <vstinner at redhat.com>
committer: GitHub <noreply at github.com>
date: 2018年11月30日T18:30:09+01:00
summary:
bpo-35352: Cleanup test_asyncio/utils.py (GH-10831)
'here' variable is no longer needed.
files:
M Lib/test/test_asyncio/utils.py
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py
index 7084edfeca93..8b23b0175076 100644
--- a/Lib/test/test_asyncio/utils.py
+++ b/Lib/test/test_asyncio/utils.py
@@ -156,14 +156,8 @@ def finish_request(self, request, client_address):
# 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:
More information about the Python-checkins
mailing list