added failing test for optimised float .conjugate() method
authorStefan Behnel <stefan_ml@behnel.de>
Sat, 25 Aug 2012 07:01:41 +0000 (09:01 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Sat, 25 Aug 2012 07:01:41 +0000 (09:01 +0200)
tests/bugs.txt
tests/run/builtin_float.py [new file with mode: 0644]

index 1d68893..6a0161b 100644 (file)
@@ -19,6 +19,7 @@ class_scope_T671
 slice2_T636
 builtin_subtype_methods_T653
 dict_values_in_expression
+builtin_float
 
 # CPython regression tests that don't current work:
 pyregr.test_signal
diff --git a/tests/run/builtin_float.py b/tests/run/builtin_float.py
new file mode 100644 (file)
index 0000000..f2eff2b
--- /dev/null
@@ -0,0 +1,34 @@
+
+import sys
+
+def empty_float():
+    """
+    >>> float()
+    0.0
+    >>> empty_float()
+    0.0
+    """
+    x = float()
+    return x
+
+def float_conjugate():
+    """
+    >>> float_call_conjugate()
+    1.5
+    """
+    if sys.version_info >= (2,6):
+        x = 1.5 .conjugate()
+    else:
+        x = 1.5
+    return x
+
+def float_call_conjugate():
+    """
+    >>> float_call_conjugate()
+    1.5
+    """
+    if sys.version_info >= (2,6):
+        x = float(1.5).conjugate()
+    else:
+        x = 1.5
+    return x