We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parenta343b34 commitce40fb1Copy full SHA for ce40fb1
src/tests/test_method.py
@@ -743,3 +743,29 @@ def test_we_can_bind_to_encoding_get_string():
743
744
data=''.join(data)
745
assertdata=='Some testing string'
746
+
747
748
+deftest_wrong_overload():
749
+"""Test regression in which implicit conversion caused the wrong types
750
+ to be used. See #131 for issue. Fixed by #137, #151"""
751
752
+# Used to return `50L`
753
+res=System.Math.Abs(50.5)
754
+assertres==50.5
755
+asserttype(res)==float
756
757
+res=System.Math.Abs(-50.5)
758
759
760
761
+res=System.Math.Max(50.5,50.1)
762
763
764
765
+res=System.Math.Max(System.Double(10.5),System.Double(50.5))
766
767
+asserttype(res)==float# Should it return a System.Double?
768
769
+res=System.Math.Max(System.Double(50.5),50.1)
770
771