[issue37789] Update doc strings for test.bytecode_helper

2022-03-20 Thread Irit Katriel


Irit Katriel  added the comment:

This has been fixed by now.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37789] Update doc strings for test.bytecode_helper

2019-08-07 Thread Joannah Nanjekye


Joannah Nanjekye  added the comment:

*supposed not supported.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37789] Update doc strings for test.bytecode_helper

2019-08-07 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37789] Update doc strings for test.bytecode_helper

2019-08-07 Thread Joannah Nanjekye


New submission from Joannah Nanjekye :

I want to believe there is a mistake in the doc strings for these methods:

def assertInBytecode(self, x, opname, argval=_UNSPECIFIED):
"""Returns instr if op is found, otherwise throws AssertionError"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
if argval is _UNSPECIFIED or instr.argval == argval:
return instr
disassembly = self.get_disassembly_as_string(x)
if argval is _UNSPECIFIED:
msg = '%s not found in bytecode:\n%s' % (opname, disassembly)
else:
msg = '(%s,%r) not found in bytecode:\n%s'
msg = msg % (opname, argval, disassembly)
self.fail(msg)

def assertNotInBytecode(self, x, opname, argval=_UNSPECIFIED):
"""Throws AssertionError if op is found"""
for instr in dis.get_instructions(x):
if instr.opname == opname:
disassembly = self.get_disassembly_as_string(x)
if argval is _UNSPECIFIED:
msg = '%s occurs in bytecode:\n%s' % (opname, disassembly)
elif instr.argval == argval:
msg = '(%s,%r) occurs in bytecode:\n%s'
msg = msg % (opname, argval, disassembly)
self.fail(msg)

It is supported to refer to *opname* not *op*. Either the method signatures or 
the doc strings have to be updated. I stand to be corrected If wrong though.

--
messages: 349193
nosy: nanjekyejoannah
priority: normal
severity: normal
status: open
title: Update doc strings for test.bytecode_helper

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com