Skip to content

Commit 8f4a0eb

Browse files
Guard new hashlib ctor test
1 parent 6eb1190 commit 8f4a0eb

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Lib/test/test_hashlib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,10 @@ def test_clinic_signature(self):
274274
with self.assertWarnsRegex(DeprecationWarning,
275275
DEPRECATED_STRING_PARAMETER):
276276
hashlib.new(digest_name, string=b'')
277-
if self._hashlib:
277+
# when using a combination of libcrypto and interned hash
278+
# implementations, we need to make sure that _hashlib contains
279+
# the constructor we're testing
280+
if self._hashlib and digest_name in self._hashlib._constructors:
278281
self._hashlib.new(digest_name, b'')
279282
self._hashlib.new(digest_name, data=b'')
280283
with self.assertWarnsRegex(DeprecationWarning,

Tools/ssl/multissltests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ def _build_src(self, config_args=()):
486486
"-DCMAKE_PREFIX_PATH={}".format(self.install_dir),
487487
"-DCMAKE_INSTALL_PREFIX={}".format(self.install_dir),
488488
"-DBUILD_SHARED_LIBS=ON",
489+
"-DBUILD_TESTING=OFF",
489490
"-DFIPS=OFF",
490491
]
491492
self._subprocess_call(cmd, cwd=cwd, env=env)

0 commit comments

Comments
 (0)