Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/python/cpython
/ S
Class
S
Lib/test/test_hmac.py:1408–1410 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
1406
1407
def
test_string_subclass(self):
1408
class
S(str):
1409
def
__eq__(self, other):
1410
raise
ValueError(
"should not be called"
)
1411
1412
a, b = S(
"foobar"
), S(
"foobar"
)
1413
self.assert_digest_equal(a, b)
Callers
1
test_string_subclass
Method · 0.70
Calls
no outgoing calls
Tested by
1
test_string_subclass
Method · 0.56