[pypy-svn] r14752 - pypy/dist/pypy/translator/c/test
pedronis at codespeak.net
pedronis at codespeak.net
Tue Jul 19 00:35:52 CEST 2005
Author: pedronis
Date: Tue Jul 19 00:35:52 2005
New Revision: 14752
Modified:
pypy/dist/pypy/translator/c/test/test_typed.py
Log:
avoid using a mixed type list
Modified: pypy/dist/pypy/translator/c/test/test_typed.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_typed.py (original)
+++ pypy/dist/pypy/translator/c/test/test_typed.py Tue Jul 19 00:35:52 2005
@@ -37,7 +37,7 @@
def test_get_set_del_slice(self):
def get_set_del_nonneg_slice(): # no neg slices for now!
- l = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']
+ l = [ord('a'), ord('b'), ord('c'), ord('d'), ord('e'), ord('f'), ord('g'), ord('h'), ord('i'), ord('j')]
del l[:1]
bound = len(l)-1
if bound >= 0:
@@ -48,7 +48,7 @@
#assert bound >= 0
#l[bound:] = [9] no setting slice into lists for now
#l[2:4] = [8,11]
- l[0], l[-1], l[2], l[3] = 3, 9, 8, 11
+ l[0], l[-1], l[2], l[3] =3, 9, 8, 11
list_3_c = l[:2]
list_9 = l[5:]
@@ -59,10 +59,10 @@
len(list_11_h), list_11_h[0], list_11_h[1])
fn = self.getcompiled(get_set_del_nonneg_slice)
result = fn()
- assert result == (6, 3, 'c', 8, 11, 'h', 9,
- 2, 3, 'c',
+ assert result == (6, 3, ord('c'), 8, 11, ord('h'), 9,
+ 2, 3, ord('c'),
1, 9,
- 2, 11, 'h')
+ 2, 11, ord('h'))
def test_is(self):
def testfn():
More information about the Pypy-commit
mailing list