diff options
| author | Christoph Zwerschke <cito@online.de> | 2016-04-11 23:15:25 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2016-04-15 12:00:27 -0400 |
| commit | b59cbb5fd7d2ab56334774c6354fffa0b50448bc (patch) | |
| tree | f08bb82751830440739a2854a783fa1763bb9a63 /test/dialect/postgresql | |
| parent | bde46e33593805584c7c0dedb3a666909fb67888 (diff) | |
| download | sqlalchemy-b59cbb5fd7d2ab56334774c6354fffa0b50448bc.tar.gz | |
- Add support for PostgreSQL with PyGreSQL
Change-Id: I040b75ff3b4110e7e8b26442a4eb226ba8c26715
Pull-request: https://github.com/zzzeek/sqlalchemy/pull/234
Diffstat (limited to 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_query.py | 1 | ||||
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 13 |
2 files changed, 9 insertions, 5 deletions
diff --git a/test/dialect/postgresql/test_query.py b/test/dialect/postgresql/test_query.py index 9f92a7830..c031e43de 100644 --- a/test/dialect/postgresql/test_query.py +++ b/test/dialect/postgresql/test_query.py @@ -761,6 +761,7 @@ class MatchTest(fixtures.TestBase, AssertsCompiledSQL): @testing.fails_on('postgresql+psycopg2', 'uses pyformat') @testing.fails_on('postgresql+pypostgresql', 'uses pyformat') + @testing.fails_on('postgresql+pygresql', 'uses pyformat') @testing.fails_on('postgresql+zxjdbc', 'uses qmark') @testing.fails_on('postgresql+psycopg2cffi', 'uses pyformat') def test_expression_positional(self): diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 8818a9941..6bcc4cf9a 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -544,11 +544,11 @@ class NumericInterpretationTest(fixtures.TestBase): __backend__ = True def test_numeric_codes(self): - from sqlalchemy.dialects.postgresql import psycopg2cffi, pg8000, \ - psycopg2, base + from sqlalchemy.dialects.postgresql import pg8000, pygresql, \ + psycopg2, psycopg2cffi, base - dialects = (pg8000.dialect(), psycopg2.dialect(), - psycopg2cffi.dialect()) + dialects = (pg8000.dialect(), pygresql.dialect(), + psycopg2.dialect(), psycopg2cffi.dialect()) for dialect in dialects: typ = Numeric().dialect_impl(dialect) for code in base._INT_TYPES + base._FLOAT_TYPES + \ @@ -2757,7 +2757,10 @@ class JSONRoundTripTest(fixtures.TablesTest): result = engine.execute( select([data_table.c.data['k1'].astext]) ).first() - assert isinstance(result[0], util.text_type) + if engine.dialect.returns_unicode_strings: + assert isinstance(result[0], util.text_type) + else: + assert isinstance(result[0], util.string_types) def test_query_returned_as_int(self): engine = testing.db |
