This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Unsupported provider

classification
Title: Increase test coverage in dis module
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, matiasb, ncoghlan, python-dev
Priority: normal Keywords: patch

Created on 2011-03-15 18:50 by matiasb, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
add_dis_tests.patch matiasb, 2011-03-15 18:50 Updates for test_dis tests review
updated_add_dis_tests.patch matiasb, 2011-03-15 19:22 Updated patch review
Messages (4)
msg131018 - (view) Author: Matias Bordese (matiasb) * Date: 2011-03-15 18:50
Attaching patch to add new tests for dis module.
msg131021 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-03-15 18:59
1. Use splitlines() instead of split('\n')
2. Use try finally when replacing sys.stdout.
3. Why is dist(None) a RuntimeError and anything else invalid TypeError?
msg131024 - (view) Author: Matias Bordese (matiasb) * Date: 2011-03-15 19:22
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
msg131029 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-03-15 19:43
New changeset f41c3d9e05bd by Benjamin Peterson in branch 'default':
improve dis test coverage (closes #11559)
http://hg.python.org/cpython/rev/f41c3d9e05bd
History
Date User Action Args
2022-04-11 14:57:14adminsetgithub: 55768
2011-03-15 19:43:45python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg131029

resolution: fixed
stage: resolved
2011-03-15 19:37:17ncoghlansetnosy: + ncoghlan
2011-03-15 19:22:55matiasbsetfiles: + updated_add_dis_tests.patch
nosy: benjamin.peterson, matiasb
messages: + msg131024
2011-03-15 18:59:15benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg131021
2011-03-15 18:50:26matiasbcreate