diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-10-10 21:02:21 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-10 21:02:21 (GMT) |
commit | 28c6cc1928bf517076a44b4112f7f56dae7f076b (patch) | |
tree | 5a5355ac0b6f7f2a3e9dd255de5fa300fab6a2d2 /Lib/test/test_asyncio/utils.py | |
parent | 4b67878daa9fee58db80609f851ada9402fcd71c (diff) | |
download | cpython-28c6cc1928bf517076a44b4112f7f56dae7f076b.zip cpython-28c6cc1928bf517076a44b4112f7f56dae7f076b.tar.gz cpython-28c6cc1928bf517076a44b4112f7f56dae7f076b.tar.bz2 |
[3.11] [3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489) (GH-109682) (#110646)
[3.12] gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489) (GH-109682)
* gh-108303: Move all certificates to `Lib/test/certdata/` (GH-109489)
(cherry picked from commit e57ecf6bbc59f999d27b125ea51b042c24a07bd9)
Python 3.12 backport: update also `test_nntplib`.
(cherry picked from commit c2d542b42cd109d81c0308f9c4437c38ac74d2e0)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: T. Wouters <thomas@python.org>
Diffstat (limited to 'Lib/test/test_asyncio/utils.py')
-rw-r--r-- | Lib/test/test_asyncio/utils.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/test/test_asyncio/utils.py b/Lib/test/test_asyncio/utils.py index 19de854..f49db4e 100644 --- a/Lib/test/test_asyncio/utils.py +++ b/Lib/test/test_asyncio/utils.py @@ -43,21 +43,21 @@ from test.support import threading_helper CLOCK_RES = 0.020 -def data_file(filename): +def data_file(*filename): if hasattr(support, 'TEST_HOME_DIR'): - fullname = os.path.join(support.TEST_HOME_DIR, filename) + fullname = os.path.join(support.TEST_HOME_DIR, *filename) if os.path.isfile(fullname): return fullname - fullname = os.path.join(os.path.dirname(__file__), '..', filename) + fullname = os.path.join(os.path.dirname(__file__), '..', *filename) if os.path.isfile(fullname): return fullname - raise FileNotFoundError(filename) + raise FileNotFoundError(os.path.join(filename)) -ONLYCERT = data_file('ssl_cert.pem') -ONLYKEY = data_file('ssl_key.pem') -SIGNED_CERTFILE = data_file('keycert3.pem') -SIGNING_CA = data_file('pycacert.pem') +ONLYCERT = data_file('certdata', 'ssl_cert.pem') +ONLYKEY = data_file('certdata', 'ssl_key.pem') +SIGNED_CERTFILE = data_file('certdata', 'keycert3.pem') +SIGNING_CA = data_file('certdata', 'pycacert.pem') PEERCERT = { 'OCSP': ('http://testca.pythontest.net/testca/ocsp/',), 'caIssuers': ('http://testca.pythontest.net/testca/pycacert.cer',), |