diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-10-30 22:00:25 +0200 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2021-11-01 15:11:25 -0400 |
| commit | 36e7aebd8d6faac77570403e99f9aa7b2330fa59 (patch) | |
| tree | f45950f61a4b27f128518be52157021ca4f4e8f7 /test/dialect/postgresql | |
| parent | a99ea884403de1e1f762e9b1eb635d7fc6ef8e6f (diff) | |
| download | sqlalchemy-36e7aebd8d6faac77570403e99f9aa7b2330fa59.tar.gz | |
First round of removal of python 2
References: #4600
Change-Id: I61e35bc93fe95610ae75b31c18a3282558cd4ffe
Diffstat (limited to 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_dialect.py | 33 | ||||
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 1 |
2 files changed, 1 insertions, 33 deletions
diff --git a/test/dialect/postgresql/test_dialect.py b/test/dialect/postgresql/test_dialect.py index c0eb4410c..6e665c71b 100644 --- a/test/dialect/postgresql/test_dialect.py +++ b/test/dialect/postgresql/test_dialect.py @@ -35,7 +35,6 @@ from sqlalchemy.dialects.postgresql.psycopg2 import EXECUTEMANY_BATCH from sqlalchemy.dialects.postgresql.psycopg2 import EXECUTEMANY_PLAIN from sqlalchemy.dialects.postgresql.psycopg2 import EXECUTEMANY_VALUES from sqlalchemy.engine import cursor as _cursor -from sqlalchemy.engine import engine_from_config from sqlalchemy.engine import url from sqlalchemy.sql.selectable import LABEL_STYLE_TABLENAME_PLUS_COL from sqlalchemy.testing import config @@ -163,44 +162,14 @@ $$ LANGUAGE plpgsql;""" future_connection.dialect.server_version_info, ) - @testing.requires.python3 @testing.requires.psycopg2_compatibility - def test_pg_dialect_no_native_unicode_in_python3(self, testing_engine): + def test_pg_dialect_no_native_unicode_in(self, testing_engine): with testing.expect_raises_message( exc.ArgumentError, "psycopg2 native_unicode mode is required under Python 3", ): testing_engine(options=dict(use_native_unicode=False)) - @testing.requires.python2 - @testing.requires.psycopg2_compatibility - def test_pg_dialect_no_native_unicode_in_python2(self, testing_engine): - e = testing_engine(options=dict(use_native_unicode=False)) - with e.connect() as conn: - eq_( - conn.exec_driver_sql(u"SELECT 'đ voix mâa rĂ©veillĂ©'").scalar(), - u"đ voix mâa rĂ©veillĂ©".encode("utf-8"), - ) - - @testing.requires.python2 - @testing.requires.psycopg2_compatibility - def test_pg_dialect_use_native_unicode_from_config(self): - config = { - "sqlalchemy.url": testing.db.url, - "sqlalchemy.use_native_unicode": "false", - } - - e = engine_from_config(config, _initialize=False) - eq_(e.dialect.use_native_unicode, False) - - config = { - "sqlalchemy.url": testing.db.url, - "sqlalchemy.use_native_unicode": "true", - } - - e = engine_from_config(config, _initialize=False) - eq_(e.dialect.use_native_unicode, True) - def test_psycopg2_empty_connection_string(self): dialect = psycopg2_dialect.dialect() u = url.make_url("postgresql://") diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index e5f027790..ebb4d4b12 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -2403,7 +2403,6 @@ class ArrayEnum(fixtures.TestBase): eq_(connection.execute(sel).fetchall(), [(["foo", "bar"],)]) @_enum_combinations - @testing.requires.python3 def test_array_of_enums_native_roundtrip( self, array_of_enum_fixture, connection, array_cls, enum_cls ): |
