added disabled test case for type inference in generators
authorStefan Behnel <scoder@users.berlios.de>
Sat, 2 Apr 2011 09:58:08 +0000 (11:58 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 2 Apr 2011 09:58:08 +0000 (11:58 +0200)
tests/bugs.txt
tests/run/generator_type_inference.pyx [new file with mode: 0644]

index c8845007f082d382ac7a4097db9fa98368710d98..f1478a3bccccece35484b3666706cfb69394c4d6 100644 (file)
@@ -18,6 +18,7 @@ genexpr_iterable_lookup_T600
 for_from_pyvar_loop_T601
 decorators_T593
 temp_sideeffects_T654
+generator_type_inference
 
 # CPython regression tests that don't current work:
 pyregr.test_threadsignals
diff --git a/tests/run/generator_type_inference.pyx b/tests/run/generator_type_inference.pyx
new file mode 100644 (file)
index 0000000..d8c7c85
--- /dev/null
@@ -0,0 +1,13 @@
+# mode: run
+# tag: typeinference, generators
+
+cimport cython
+
+def test_type_inference():
+    """
+    >>> [ item for item in test_type_inference() ]
+    [(2.0, 'double'), (2.0, 'double'), (2.0, 'double')]
+    """
+    x = 1.0
+    for i in range(3):
+        yield x * 2.0, cython.typeof(x)