(self)
| 1852 | self.assertEqual(ReplaceGlobalInt.TWO.__reduce_ex__(proto), 'TWO') |
| 1853 | |
| 1854 | def test_pickle_explodes(self): |
| 1855 | BadPickle = Enum( |
| 1856 | 'BadPickle', 'dill sweet bread-n-butter', module=__name__) |
| 1857 | globals()['BadPickle'] = BadPickle |
| 1858 | # now break BadPickle to test exception raising |
| 1859 | enum._make_class_unpicklable(BadPickle) |
| 1860 | test_pickle_exception(self.assertRaises, TypeError, BadPickle.dill) |
| 1861 | test_pickle_exception(self.assertRaises, PicklingError, BadPickle) |
| 1862 | |
| 1863 | def test_string_enum(self): |
| 1864 | class SkillLevel(str, Enum): |
nothing calls this directly
no test coverage detected