Author: Manuel Jacob <m...@manueljacob.de> Branch: py3k Changeset: r82044:8645b9cf5eab Date: 2016-02-02 18:30 +0100 http://bitbucket.org/pypy/pypy/changeset/8645b9cf5eab/
Log: 2to3 diff --git a/pypy/module/__pypy__/test/test_magic.py b/pypy/module/__pypy__/test/test_magic.py --- a/pypy/module/__pypy__/test/test_magic.py +++ b/pypy/module/__pypy__/test/test_magic.py @@ -24,26 +24,26 @@ __pypy__.set_code_callback(callable) d = {} try: - exec """ + exec(""" def f(): pass -""" in d +""", d) finally: __pypy__.set_code_callback(None) assert d['f'].__code__ in l def test_decode_long(self): from __pypy__ import decode_long - assert decode_long('') == 0 - assert decode_long('\xff\x00') == 255 - assert decode_long('\xff\x7f') == 32767 - assert decode_long('\x00\xff') == -256 - assert decode_long('\x00\x80') == -32768 - assert decode_long('\x80') == -128 - assert decode_long('\x7f') == 127 - assert decode_long('\x55' * 97) == (1 << (97 * 8)) // 3 - assert decode_long('\x00\x80', 'big') == 128 - assert decode_long('\xff\x7f', 'little', False) == 32767 - assert decode_long('\x00\x80', 'little', False) == 32768 - assert decode_long('\x00\x80', 'little', True) == -32768 + assert decode_long(b'') == 0 + assert decode_long(b'\xff\x00') == 255 + assert decode_long(b'\xff\x7f') == 32767 + assert decode_long(b'\x00\xff') == -256 + assert decode_long(b'\x00\x80') == -32768 + assert decode_long(b'\x80') == -128 + assert decode_long(b'\x7f') == 127 + assert decode_long(b'\x55' * 97) == (1 << (97 * 8)) // 3 + assert decode_long(b'\x00\x80', 'big') == 128 + assert decode_long(b'\xff\x7f', 'little', False) == 32767 + assert decode_long(b'\x00\x80', 'little', False) == 32768 + assert decode_long(b'\x00\x80', 'little', True) == -32768 raises(ValueError, decode_long, '', 'foo') _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit