aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_hashlib.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-04-30 14:06:49 +0200
committerGitHub <noreply@github.com>2021-04-30 14:06:49 +0200
commit0cad068ec174bbe33fb80460da56eb413f3b9359 (patch)
tree530294e1078c5da834364b5d8f2637bbb4fc28f7 /Lib/test/test_hashlib.py
parent3bb09947ec4837de75532e21dd4bd25db0a1f1b7 (diff)
downloadcpython-0cad068ec174bbe33fb80460da56eb413f3b9359.tar.gz
cpython-0cad068ec174bbe33fb80460da56eb413f3b9359.zip
bpo-43916: Remove _disabled_new() function (GH-25745)
posix and _hashlib use the new Py_TPFLAGS_DISALLOW_INSTANTIATION flag on their heap types, rather than using a custom tp_new function (_disabled_new).
Diffstat (limited to 'Lib/test/test_hashlib.py')
-rw-r--r--Lib/test/test_hashlib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_hashlib.py b/Lib/test/test_hashlib.py
index 9e9c874445c..1236aa723b1 100644
--- a/Lib/test/test_hashlib.py
+++ b/Lib/test/test_hashlib.py
@@ -905,11 +905,11 @@ class HashLibTestCase(unittest.TestCase):
def test_internal_types(self):
# internal types like _hashlib.HASH are not constructable
with self.assertRaisesRegex(
- TypeError, "cannot create 'HASH' instance"
+ TypeError, "cannot create '_hashlib.HASH' instance"
):
HASH()
with self.assertRaisesRegex(
- TypeError, "cannot create 'HASHXOF' instance"
+ TypeError, "cannot create '_hashlib.HASHXOF' instance"
):
HASHXOF()