(self, func, lasti=-1, wrapper=True, **kwargs)
| 1000 | maxDiff = None |
| 1001 | |
| 1002 | def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs): |
| 1003 | # We want to test the default printing behaviour, not the file arg |
| 1004 | output = io.StringIO() |
| 1005 | with contextlib.redirect_stdout(output): |
| 1006 | if wrapper: |
| 1007 | dis.dis(func, **kwargs) |
| 1008 | else: |
| 1009 | dis.disassemble(func, lasti, **kwargs) |
| 1010 | return output.getvalue() |
| 1011 | |
| 1012 | def get_disassemble_as_string(self, func, lasti=-1): |
| 1013 | return self.get_disassembly(func, lasti, False) |
no test coverage detected