(self, result, object, methodname, *args)
| 82 | self.addCleanup(codecs.unregister, search_function) |
| 83 | |
| 84 | def checkequalnofix(self, result, object, methodname, *args): |
| 85 | method = getattr(object, methodname) |
| 86 | realresult = method(*args) |
| 87 | self.assertEqual(realresult, result) |
| 88 | self.assertTrue(type(realresult) is type(result)) |
| 89 | |
| 90 | # if the original is returned make sure that |
| 91 | # this doesn't happen with subclasses |
| 92 | if realresult is object: |
| 93 | class usub(str): |
| 94 | def __repr__(self): |
| 95 | return 'usub(%r)' % str.__repr__(self) |
| 96 | object = usub(object) |
| 97 | method = getattr(object, methodname) |
| 98 | realresult = method(*args) |
| 99 | self.assertEqual(realresult, result) |
| 100 | self.assertTrue(object is not realresult) |
| 101 | |
| 102 | def assertTypedEqual(self, actual, expected): |
| 103 | self.assertIs(type(actual), type(expected)) |
no test coverage detected