diff options
author | Robert Leftwich <rtl@pobox.com> | 2006-01-16 06:22:52 +0000 |
---|---|---|
committer | Robert Leftwich <rtl@pobox.com> | 2006-01-16 06:22:52 +0000 |
commit | c4085b0fbf78c533c50fea3fd778c770adb40a70 (patch) | |
tree | 670d51ea0140460620228d5601810a3eb95b1816 /test | |
parent | 8757832f4ec6c3e6b8eefd36e30978928c8f6013 (diff) | |
download | sqlalchemy-c4085b0fbf78c533c50fea3fd778c770adb40a70.tar.gz |
Fixed problem in Column.copy(), _make_proxy() with nullable and hidden not being reflected into new Column. Added test for same. Removed reference to non-existant columns test from list of tests in alltests.
Diffstat (limited to 'test')
-rw-r--r-- | test/alltests.py | 2 | ||||
-rw-r--r-- | test/engines.py | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/test/alltests.py b/test/alltests.py index db02f8a4c..1365b5153 100644 --- a/test/alltests.py +++ b/test/alltests.py @@ -4,7 +4,7 @@ import unittest testbase.echo = False def suite(): - modules_to_test = ('attributes', 'historyarray', 'pool', 'engines', 'query', 'columns', 'sequence', 'select', 'types', 'mapper', 'objectstore', 'manytomany', 'dependency') + modules_to_test = ('attributes', 'historyarray', 'pool', 'engines', 'query', 'sequence', 'select', 'types', 'mapper', 'objectstore', 'manytomany', 'dependency') # modules_to_test = ('engines', 'mapper') alltests = unittest.TestSuite() for module in map(__import__, modules_to_test): diff --git a/test/engines.py b/test/engines.py index b649b5a70..10aa380ba 100644 --- a/test/engines.py +++ b/test/engines.py @@ -97,6 +97,27 @@ class EngineTest(PersistTest): table.select().execute().fetchall() table.drop() + def testtoengine(self): + db = ansisql.engine() + + table = Table('mytable', db, + Column('myid', Integer, key = 'id'), + Column('name', String, key = 'name', nullable=False), + Column('description', String, key = 'description'), + ) + + print repr(table) + + pgdb = postgres.engine({}) + + pgtable = table.toengine(pgdb) + + print repr(pgtable) + assert pgtable.c.id.nullable + assert not pgtable.c.name.nullable + assert pgtable.c.description.nullable + + if __name__ == "__main__": testbase.main() |