Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r67203:d1174f51656b Date: 2013-10-08 15:07 +0200 http://bitbucket.org/pypy/pypy/changeset/d1174f51656b/
Log: A test for hex(r_uint(..)). The real goal is a bit obscure, because on top of Python the string contains a final 'L', but should we give this behavior in RPython?? diff --git a/rpython/rtyper/test/test_rint.py b/rpython/rtyper/test/test_rint.py --- a/rpython/rtyper/test/test_rint.py +++ b/rpython/rtyper/test/test_rint.py @@ -85,6 +85,14 @@ res = self.ll_to_string(res) assert res == '-0x8' + '0' * (len(res)-4) + def test_hex_of_uint(self): + def dummy(i): + return hex(r_uint(i)) + + res = self.interpret(dummy, [-5]) + res = self.ll_to_string(res) + assert res == '0x' + 'f' * (len(res)-3) + 'b' + def test_oct_of_int(self): def dummy(i): return oct(i) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit