(self, func, lasti=-1, wrapper=True, **kwargs)
| 971 | maxDiff = None |
| 972 | |
| 973 | def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs): |
| 974 | # We want to test the default printing behaviour, not the file arg |
| 975 | output = io.StringIO() |
| 976 | with contextlib.redirect_stdout(output): |
| 977 | if wrapper: |
| 978 | dis.dis(func, **kwargs) |
| 979 | else: |
| 980 | dis.disassemble(func, lasti, **kwargs) |
| 981 | return output.getvalue() |
| 982 | |
| 983 | def get_disassemble_as_string(self, func, lasti=-1): |
| 984 | return self.get_disassembly(func, lasti, False) |
no test coverage detected