summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/icalendar/files/2.1_p20100409/07_all_vGeo.from_ical-test-fix.patch')
-rw-r--r--dev-python/icalendar/files/2.1_p20100409/07_all_vGeo.from_ical-test-fix.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/dev-python/icalendar/files/2.1_p20100409/07_all_vGeo.from_ical-test-fix.patch b/dev-python/icalendar/files/2.1_p20100409/07_all_vGeo.from_ical-test-fix.patch
new file mode 100644
index 00000000000..0195e63da31
--- /dev/null
+++ b/dev-python/icalendar/files/2.1_p20100409/07_all_vGeo.from_ical-test-fix.patch
@@ -0,0 +1,17 @@
+This fixes doctests with Python 2.7. With improved float handling,
+float('37.86013') == 37.86013. This seems to be the only way to
+handle this test across Python versions.
+===================================================================
+--- src/icalendar/prop.py 2010-08-03 21:19:06.000000000 -0400
++++ src/icalendar/prop.py 2010-08-03 21:20:48.000000000 -0400
+@@ -1196,8 +1196,8 @@
+ '1.2;3.0'
+
+ >>> g = vGeo.from_ical('37.386013;-122.082932')
+- >>> g
+- (37.386012999999998, -122.082932)
++ >>> g == (float('37.386013'), float('-122.082932'))
++ True
+
+ >>> vGeo(g).ical()
+ '37.386013;-122.082932'