Fixed unittests.

This commit is contained in:
Griatch 2016-08-24 23:49:24 +02:00
parent 7285cab2db
commit 5835a84e20

View file

@ -93,9 +93,10 @@ def format_header(caller, entry):
"""
width = _HEADER_WIDTH - 10
# strip all comments for the header
entry = _RE_CODE_START.split(entry, 1)[1]
entry = _RE_COMMENT.sub("", entry).strip()
if caller.ndb.batch_batchmode != "batch_commands":
# only do cleanup for batchcode
entry = _RE_CODE_START.split(entry, 1)[1]
entry = _RE_COMMENT.sub("", entry).strip()
header = utils.crop(entry, width=width)
ptr = caller.ndb.batch_stackptr + 1
stacklen = len(caller.ndb.batch_stack)