[issue11559] Increase test coverage in dis module

Matias Bordese report at bugs.python.org
Tue Mar 15 20:22:56 CET 2011


Matias Bordese <mbordese at gmail.com> added the comment:

Updated patch following Benjamin advice (1. and 2.).

Re 3. Why is dist(None) a RuntimeError and anything else invalid TypeError?

When the dis argument is None, the last traceback is disassembled; if something different to None and that does not have code (ie. no class, method, function or bytecode) is passed, the TypeError exception is raised [0].

[0] http://hg.python.org/cpython/file/1c0cded97280/Lib/dis.py#l28

----------
Added file: http://bugs.python.org/file21225/updated_add_dis_tests.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11559>
_______________________________________


More information about the Python-bugs-list mailing list