Author: Antonio Cuni <anto.c...@gmail.com> Branch: Changeset: r45859:0a106042ba51 Date: 2011-07-22 09:50 +0200 http://bitbucket.org/pypy/pypy/changeset/0a106042ba51/
Log: bah, test&fix for a bug introduced by 065c98a10f0d (commit message: "that way easy" :-)) diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py --- a/pypy/tool/jitlogparser/parser.py +++ b/pypy/tool/jitlogparser/parser.py @@ -37,7 +37,7 @@ return self._is_guard def repr(self): - args = self.args + args = self.args[:] if self.descr is not None: args.append('descr=%s' % self.descr) arglist = ', '.join(args) diff --git a/pypy/tool/jitlogparser/test/test_parser.py b/pypy/tool/jitlogparser/test/test_parser.py --- a/pypy/tool/jitlogparser/test/test_parser.py +++ b/pypy/tool/jitlogparser/test/test_parser.py @@ -1,6 +1,6 @@ from pypy.tool.jitlogparser.parser import (SimpleParser, TraceForOpcode, Function, adjust_bridges, - import_log) + import_log, Op) from pypy.tool.jitlogparser.storage import LoopStorage import py, sys @@ -225,3 +225,9 @@ assert 'cmp' in loops[1].operations[1].asm # bridge assert 'jo' in loops[3].operations[3].asm + +def test_Op_repr_is_pure(): + op = Op('foobar', ['a', 'b'], 'c', 'mydescr') + myrepr = 'c = foobar(a, b, descr=mydescr)' + assert op.repr() == myrepr + assert op.repr() == myrepr # do it twice _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit