(self)
| 493 | assert list(gen2(3)) == list(range(3)) |
| 494 | |
| 495 | def test_classmethod(self): |
| 496 | class A: |
| 497 | @staticmethod |
| 498 | def test_sm(): |
| 499 | return "sm" |
| 500 | |
| 501 | @classmethod |
| 502 | def test_cm(cls): |
| 503 | return "cm" |
| 504 | |
| 505 | sm = A.__dict__["test_sm"] |
| 506 | cm = A.__dict__["test_cm"] |
| 507 | |
| 508 | A.test_sm = pickle_depickle(sm, protocol=self.protocol) |
| 509 | A.test_cm = pickle_depickle(cm, protocol=self.protocol) |
| 510 | |
| 511 | self.assertEqual(A.test_sm(), "sm") |
| 512 | self.assertEqual(A.test_cm(), "cm") |
| 513 | |
| 514 | def test_bound_classmethod(self): |
| 515 | class A: |
nothing calls this directly
no test coverage detected