mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 17:06:33 +03:00
Fixed test broken by float precision fix
This commit is contained in:
parent
7b730f3935
commit
d40a5321f2
|
@ -1,3 +1,7 @@
|
|||
2009-11-25 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
* tests/types_basic.py: fixed test broken by float precision fix.
|
||||
|
||||
2009-11-09 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
* psycopg/adapter_pfloat.c: applied patch from Remy Blankto fix float
|
||||
|
|
|
@ -50,9 +50,9 @@ class TypesBasicTests(unittest.TestCase):
|
|||
self.failUnless(s == 1971, "wrong integer quoting: " + str(s))
|
||||
s = self.execute("SELECT %s AS foo", (1971L,))
|
||||
self.failUnless(s == 1971L, "wrong integer quoting: " + str(s))
|
||||
# Python 2.4 defaults to Decimal?
|
||||
# Python 2.4 defaults to Decimal? (Apparently it does not.)
|
||||
if sys.version_info[0] >= 2 and sys.version_info[1] >= 4:
|
||||
s = self.execute("SELECT %s AS foo", (19.10,))
|
||||
s = self.execute("SELECT %s AS foo", (decimal.Decimal("19.10"),))
|
||||
self.failUnless(s - decimal.Decimal("19.10") == 0,
|
||||
"wrong decimal quoting: " + str(s))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user