MCPcopy Index your code
hub / github.com/RustPython/RustPython / checkequal

Method checkequal

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

Source from the content-addressed store, hash-verified

17 # can't cope with arguments propagated to UserString
18 # (and we don't test with subclasses)
19 def checkequal(self, result, object, methodname, *args, **kwargs):
20 result = self.fixtype(result)
21 object = self.fixtype(object)
22 # we don't fix the arguments, because UserString can't cope with it
23 realresult = getattr(object, methodname)(*args, **kwargs)
24 self.assertEqual(
25 result,
26 realresult
27 )
28
29 def checkraises(self, exc, obj, methodname, *args, expected_msg=None):
30 obj = self.fixtype(obj)

Callers 2

Calls 3

getattrFunction · 0.85
fixtypeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected