Kirill Simonov committed 94469b9

Python 2.5 compatibility fix in API tests.

Comments (0)

Files changed (1)


 from htsql import HTSQL
-import decimal, datetime
+import sys, decimal, datetime
 db = str(
 print "$boolean: %r" % boolean_value
 print "$integer: %r" % integer_value
 print "$float: %r" % float_value
-print "$decimal: %r" % decimal_value
+if sys.version_info[:2] == (2, 5):
+    print ("$decimal: %r" % decimal_value).replace('"', '\'')
+    print "$decimal: %r" % decimal_value
 print "$date: %r" % date_value
 print "$time: %r" % time_value
 print "$datetime: %r" % datetime_value
-    print row
+    if sys.version_info[:2] == (2, 5):
+        print str(row).replace('"', '\'')
+    else:
+        print row
 htsql = HTSQL(db, {'tweak.meta': None})
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.