diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-15 13:49:39 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-01-15 13:49:39 -0500 |
commit | fc0ffac24155931c2db10d1a469e1f7898268e45 (patch) | |
tree | ff1bebe5da5bd6f8fd86a417f15979bbe4a8577b /test/dialect/test_postgresql.py | |
parent | 39c79c039c8feb89bab1fd389eb4844988414838 (diff) | |
download | sqlalchemy-fc0ffac24155931c2db10d1a469e1f7898268e45.tar.gz |
stupid workaround for pg8000
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r-- | test/dialect/test_postgresql.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index fb5a63c9b..083d32b15 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -495,12 +495,14 @@ class NumericInterpretationTest(TestBase): @testing.provide_metadata def test_numeric_default(self): + # pg8000 appears to fail when the value is 0, + # returns an int instead of decimal. t =Table('t', metadata, Column('id', Integer, primary_key=True), - Column('nd', Numeric(asdecimal=True), default=0), - Column('nf', Numeric(asdecimal=False), default=0), - Column('fd', Float(asdecimal=True), default=0), - Column('ff', Float(asdecimal=False), default=0), + Column('nd', Numeric(asdecimal=True), default=1), + Column('nf', Numeric(asdecimal=False), default=1), + Column('fd', Float(asdecimal=True), default=1), + Column('ff', Float(asdecimal=False), default=1), ) metadata.create_all() r = t.insert().execute() @@ -512,7 +514,7 @@ class NumericInterpretationTest(TestBase): assert isinstance(row[4], float) eq_( row, - (1, decimal.Decimal("0"), 0, decimal.Decimal("0"), 0) + (1, decimal.Decimal("1"), 1, decimal.Decimal("1"), 1) ) class InsertTest(TestBase, AssertsExecutionResults): |