(const)
| 784 | # and have the same type. |
| 785 | |
| 786 | def check_same_constant(const): |
| 787 | ns = {} |
| 788 | code = "f1, f2 = lambda: %r, lambda: %r" % (const, const) |
| 789 | exec(code, ns) |
| 790 | f1 = ns['f1'] |
| 791 | f2 = ns['f2'] |
| 792 | self.assertIs(f1.__code__.co_consts, f2.__code__.co_consts) |
| 793 | self.check_constant(f1, const) |
| 794 | self.assertEqual(repr(f1()), repr(const)) |
| 795 | |
| 796 | check_same_constant(None) |
| 797 | check_same_constant(0.0) |
nothing calls this directly
no test coverage detected