From 24e6c56da8cd38a203021639172da0f6fad87f3b Mon Sep 17 00:00:00 2001 From: Philip Jenvey Date: Sat, 23 Apr 2011 14:15:08 -0700 Subject: [PATCH] update warnings per zxjdbc --- test/dialect/test_postgresql.py | 9 +++++++++ test/orm/inheritance/test_basic.py | 2 +- test/orm/test_versioning.py | 13 +++++++++++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index 125b590f1d..9d783eb41b 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -282,6 +282,8 @@ class FloatCoercionTest(fixtures.TablesTest, AssertsExecutionResults): ).scalar() eq_(round_decimal(ret, 9), result) + @testing.fails_on('postgresql+zxjdbc', + 'zxjdbc has no support for PG arrays') @testing.provide_metadata def test_arrays(self): metadata = self.metadata @@ -1816,6 +1818,9 @@ class ArrayTest(fixtures.TestBase, AssertsExecutionResults): sess.add(foo) sess.flush() + @testing.fails_on('+zxjdbc', + "Can't infer the SQL type to use for an instance " + "of org.python.core.PyList.") @testing.provide_metadata def test_tuple_flag(self): metadata = self.metadata @@ -2064,6 +2069,8 @@ class UUIDTest(fixtures.TestBase): __only_on__ = 'postgresql' @testing.requires.python25 + @testing.fails_on('postgresql+zxjdbc', + 'column "data" is of type uuid but expression is of type character varying') @testing.fails_on('postgresql+pg8000', 'No support for UUID type') def test_uuid_string(self): import uuid @@ -2076,6 +2083,8 @@ class UUIDTest(fixtures.TestBase): ) @testing.requires.python25 + @testing.fails_on('postgresql+zxjdbc', + 'column "data" is of type uuid but expression is of type character varying') @testing.fails_on('postgresql+pg8000', 'No support for UUID type') def test_uuid_uuid(self): import uuid diff --git a/test/orm/inheritance/test_basic.py b/test/orm/inheritance/test_basic.py index c4c18eb4bb..2d95e5f378 100644 --- a/test/orm/inheritance/test_basic.py +++ b/test/orm/inheritance/test_basic.py @@ -791,7 +791,7 @@ class VersioningTest(fixtures.MappedTest): s2.subdata = 'sess2 subdata' sess2.flush() - @testing.emits_warning(r".*updated rowcount") + @testing.emits_warning(r".*(update|delete)d rowcount") def test_delete(self): subtable, base = self.tables.subtable, self.tables.base diff --git a/test/orm/test_versioning.py b/test/orm/test_versioning.py index 28683f740a..6f379b0020 100644 --- a/test/orm/test_versioning.py +++ b/test/orm/test_versioning.py @@ -74,7 +74,7 @@ class VersioningTest(fixtures.MappedTest): finally: testing.db.dialect.supports_sane_rowcount = save - @testing.emits_warning(r'.*does not support updated rowcount') + @testing.emits_warning_on('+zxjdbc', r'.*does not support (update|delete)d rowcount') def test_basic(self): Foo = self.classes.Foo @@ -124,7 +124,7 @@ class VersioningTest(fixtures.MappedTest): else: s1.commit() - @testing.emits_warning(r'.*does not support updated rowcount') + @testing.emits_warning_on('+zxjdbc', r'.*does not support (update|delete)d rowcount') def test_bump_version(self): """test that version number can be bumped. @@ -241,6 +241,7 @@ class VersioningTest(fixtures.MappedTest): assert f1s2.id == f1s1.id assert f1s2.value == f1s1.value + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_merge_no_version(self): Foo = self.classes.Foo @@ -258,6 +259,7 @@ class VersioningTest(fixtures.MappedTest): s1.commit() eq_(f3.version_id, 3) + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_merge_correct_version(self): Foo = self.classes.Foo @@ -275,6 +277,7 @@ class VersioningTest(fixtures.MappedTest): s1.commit() eq_(f3.version_id, 3) + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_merge_incorrect_version(self): Foo = self.classes.Foo @@ -296,6 +299,7 @@ class VersioningTest(fixtures.MappedTest): s1.merge, f2 ) + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_merge_incorrect_version_not_in_session(self): Foo = self.classes.Foo @@ -353,6 +357,7 @@ class RowSwitchTest(fixtures.MappedTest): }) mapper(C, c, version_id_col=c.c.version_id) + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_row_switch(self): P = self.classes.P @@ -366,6 +371,7 @@ class RowSwitchTest(fixtures.MappedTest): session.add(P(id='P1', data="really a row-switch")) session.commit() + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_child_row_switch(self): P, C = self.classes.P, self.classes.C @@ -421,6 +427,7 @@ class AlternateGeneratorTest(fixtures.MappedTest): version_id_generator=lambda x:make_uuid(), ) + @testing.emits_warning_on('+zxjdbc', r'.*does not support updated rowcount') def test_row_switch(self): P = self.classes.P @@ -434,6 +441,7 @@ class AlternateGeneratorTest(fixtures.MappedTest): session.add(P(id='P1', data="really a row-switch")) session.commit() + @testing.emits_warning_on('+zxjdbc', r'.*does not support (update|delete)d rowcount') def test_child_row_switch_one(self): P, C = self.classes.P, self.classes.C @@ -452,6 +460,7 @@ class AlternateGeneratorTest(fixtures.MappedTest): p.c = C(data='child row-switch') session.commit() + @testing.emits_warning_on('+zxjdbc', r'.*does not support (update|delete)d rowcount') def test_child_row_switch_two(self): P = self.classes.P -- 2.39.5