MCPcopy Index your code
hub / github.com/python/cpython / checkequal

Method checkequal

Lib/test/test_userstring.py:28–36  ·  view source on GitHub ↗
(self, result, object, methodname, *args, **kwargs)

Source from the content-addressed store, hash-verified

26 # can't cope with arguments propagated to UserString
27 # (and we don't test with subclasses)
28 def checkequal(self, result, object, methodname, *args, **kwargs):
29 result = self.fixtype(result)
30 object = self.fixtype(object)
31 # we don't fix the arguments, because UserString can't cope with it
32 realresult = getattr(object, methodname)(*args, **kwargs)
33 self.assertEqual(
34 result,
35 realresult
36 )
37
38 def checkraises(self, exc, obj, methodname, *args, expected_msg=None):
39 obj = self.fixtype(obj)

Callers 2

Calls 2

fixtypeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected