[pypy-svn] r13614 - pypy/dist/pypy/translator/c/test
arigo at codespeak.net
arigo at codespeak.net
Mon Jun 20 13:52:09 CEST 2005
Author: arigo
Date: Mon Jun 20 13:52:08 2005
New Revision: 13614
Modified:
pypy/dist/pypy/translator/c/test/test_annotated.py
Log:
Test for list comprehension.
Modified: pypy/dist/pypy/translator/c/test/test_annotated.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_annotated.py (original)
+++ pypy/dist/pypy/translator/c/test/test_annotated.py Mon Jun 20 13:52:08 2005
@@ -134,3 +134,10 @@
for i in range(1, 33):
perfect = fn(i)
assert perfect is (i in (6,28))
+
+ def test_prime(self):
+ fn = self.getcompiled(snippet.prime)
+ result = [fn(i) for i in range(1, 21)]
+ assert result == [False, True, True, False, True, False, True, False,
+ False, False, True, False, True, False, False, False,
+ True, False, True, False]
More information about the Pypy-commit
mailing list