mirror of
https://github.com/psycopg/psycopg2.git
synced 2025-01-31 17:34:08 +03:00
Fixed Decimal range tests
This commit is contained in:
parent
594a4d79ec
commit
c5de7b5ac6
|
@ -1383,7 +1383,7 @@ class RangeCasterTestCase(unittest.TestCase):
|
||||||
self.assert_(r1.lower_inc)
|
self.assert_(r1.lower_inc)
|
||||||
self.assert_(not r1.upper_inc)
|
self.assert_(not r1.upper_inc)
|
||||||
|
|
||||||
r = NumericRange(10.2, 20.5, '(]')
|
r = NumericRange(Decimal('10.2'), Decimal('20.5'), '(]')
|
||||||
cur.execute("select %s::numrange", (r,))
|
cur.execute("select %s::numrange", (r,))
|
||||||
r1 = cur.fetchone()[0]
|
r1 = cur.fetchone()[0]
|
||||||
self.assert_(isinstance(r1, NumericRange))
|
self.assert_(isinstance(r1, NumericRange))
|
||||||
|
@ -1411,7 +1411,7 @@ class RangeCasterTestCase(unittest.TestCase):
|
||||||
self.assert_(r1.lower_inc)
|
self.assert_(r1.lower_inc)
|
||||||
self.assert_(not r1.upper_inc)
|
self.assert_(not r1.upper_inc)
|
||||||
|
|
||||||
r = NumericRange(10.2, 20.5, '(]')
|
r = NumericRange(Decimal('10.2'), Decimal('20.5'), '(]')
|
||||||
cur.execute("select %s::numrange", (r,))
|
cur.execute("select %s::numrange", (r,))
|
||||||
r1 = cur.fetchone()[0]
|
r1 = cur.fetchone()[0]
|
||||||
self.assert_(isinstance(r1, NumericRange))
|
self.assert_(isinstance(r1, NumericRange))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user