(self)
| 3144 | class ExceptionNotesTest(unittest.TestCase): |
| 3145 | |
| 3146 | def setUp(self): |
| 3147 | self.codec_name = 'exception_notes_test' |
| 3148 | codecs.register(_get_test_codec) |
| 3149 | self.addCleanup(codecs.unregister, _get_test_codec) |
| 3150 | |
| 3151 | # We store the object to raise on the instance because of a bad |
| 3152 | # interaction between the codec caching (which means we can't |
| 3153 | # recreate the codec entry) and regrtest refleak hunting (which |
| 3154 | # runs the same test instance multiple times). This means we |
| 3155 | # need to ensure the codecs call back in to the instance to find |
| 3156 | # out which exception to raise rather than binding them in a |
| 3157 | # closure to an object that may change on the next run |
| 3158 | self.obj_to_raise = RuntimeError |
| 3159 | |
| 3160 | def tearDown(self): |
| 3161 | _TEST_CODECS.pop(self.codec_name, None) |
nothing calls this directly
no test coverage detected