(self, func, expected)
| 780 | self.assertEqual(namespace['x'], 12) |
| 781 | |
| 782 | def check_constant(self, func, expected): |
| 783 | for const in func.__code__.co_consts: |
| 784 | if repr(const) == repr(expected): |
| 785 | break |
| 786 | else: |
| 787 | self.fail("unable to find constant %r in %r" |
| 788 | % (expected, func.__code__.co_consts)) |
| 789 | |
| 790 | # Merging equal constants is not a strict requirement for the Python |
| 791 | # semantics, it's a more an implementation detail. |
no test coverage detected