summaryrefslogtreecommitdiff
path: root/test/sql/unicode.py
diff options
context:
space:
mode:
authorJason Kirtland <jek@discorporate.us>2007-10-14 18:35:51 +0000
committerJason Kirtland <jek@discorporate.us>2007-10-14 18:35:51 +0000
commit79dafdf3d4ffe9cb56ee0b03651b92e7e7b7353e (patch)
tree11b269f674661fa4baebbc8b4d9e590f23329fb4 /test/sql/unicode.py
parentb56ed8ccb84fb4e173930696ed052acdff5cc3ad (diff)
downloadsqlalchemy-79dafdf3d4ffe9cb56ee0b03651b92e7e7b7353e.tar.gz
Restored unicode foreign key tests for [ticket:729].
Diffstat (limited to 'test/sql/unicode.py')
-rw-r--r--test/sql/unicode.py43
1 files changed, 26 insertions, 17 deletions
diff --git a/test/sql/unicode.py b/test/sql/unicode.py
index 1b7698301..55f3f6bc5 100644
--- a/test/sql/unicode.py
+++ b/test/sql/unicode.py
@@ -27,23 +27,32 @@ class UnicodeSchemaTest(PersistTest):
),
test_needs_fk=True,
)
- t3 = Table(u'\u6e2c\u8a66', metadata,
- Column(u'\u6e2c\u8a66_id', Integer, primary_key=True,
- autoincrement=False),
- Column(u'unitable1_\u6e2c\u8a66', Integer,
- # lets leave these out for now so that PG tests pass, until
- # the test can be broken out into a pg-passing version (or we figure it out)
- #ForeignKey(u'unitable1.\u6e2c\u8a66')
- ),
- Column(u'Unitéble2_b', Integer,
- # ForeignKey(u'Unitéble2.b')
- ),
- Column(u'\u6e2c\u8a66_self', Integer,
- # ForeignKey(u'\u6e2c\u8a66.\u6e2c\u8a66_id')
- ),
- test_needs_fk=True,
-
- )
+
+ # Few DBs support Unicode foreign keys
+ if testing.against('sqlite'):
+ t3 = Table(u'\u6e2c\u8a66', metadata,
+ Column(u'\u6e2c\u8a66_id', Integer, primary_key=True,
+ autoincrement=False),
+ Column(u'unitable1_\u6e2c\u8a66', Integer,
+ ForeignKey(u'unitable1.\u6e2c\u8a66')
+ ),
+ Column(u'Unitéble2_b', Integer,
+ ForeignKey(u'Unitéble2.b')
+ ),
+ Column(u'\u6e2c\u8a66_self', Integer,
+ ForeignKey(u'\u6e2c\u8a66.\u6e2c\u8a66_id')
+ ),
+ test_needs_fk=True,
+ )
+ else:
+ t3 = Table(u'\u6e2c\u8a66', metadata,
+ Column(u'\u6e2c\u8a66_id', Integer, primary_key=True,
+ autoincrement=False),
+ Column(u'unitable1_\u6e2c\u8a66', Integer),
+ Column(u'Unitéble2_b', Integer),
+ Column(u'\u6e2c\u8a66_self', Integer),
+ test_needs_fk=True,
+ )
metadata.create_all()
@testing.unsupported('oracle', 'sybase')