Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88759:d84373506b5d
Date: 2016-11-30 12:15 +0100
http://bitbucket.org/pypy/pypy/changeset/d84373506b5d/
Log: Painfully fix the test so that it tests something reasonable on
Python 3 (not passing yet)
diff --git a/pypy/module/pypyjit/test_pypy_c/test_string.py
b/pypy/module/pypyjit/test_pypy_c/test_string.py
--- a/pypy/module/pypyjit/test_pypy_c/test_string.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_string.py
@@ -9,10 +9,11 @@
def main(n):
i = 0
letters = b'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+ letters = [b'%c' % n for n in letters] # list of single-char bytes
uletters = u'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
while i < n:
- i += (letters[i % len(letters)].decode() ==
- uletters[i % len(letters)])
+ c = letters[i % len(uletters)]
+ i += (c.decode() == uletters[i % len(uletters)])
return i
log = self.run(main, [300], import_site=True)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit