(self, func, expected)
| 769 | self.assertEqual(namespace['x'], 12) |
| 770 | |
| 771 | def check_constant(self, func, expected): |
| 772 | for const in func.__code__.co_consts: |
| 773 | if repr(const) == repr(expected): |
| 774 | break |
| 775 | else: |
| 776 | self.fail("unable to find constant %r in %r" |
| 777 | % (expected, func.__code__.co_consts)) |
| 778 | |
| 779 | # Merging equal constants is not a strict requirement for the Python |
| 780 | # semantics, it's a more an implementation detail. |
no test coverage detected