diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/alltests.py | 71 | ||||
-rw-r--r-- | test/base/__init__.py | 0 | ||||
-rw-r--r-- | test/base/alltests.py | 21 | ||||
-rw-r--r-- | test/base/attributes.py (renamed from test/attributes.py) | 0 | ||||
-rw-r--r-- | test/base/dependency.py (renamed from test/dependency.py) | 0 | ||||
-rw-r--r-- | test/base/historyarray.py (renamed from test/historyarray.py) | 0 | ||||
-rw-r--r-- | test/engine/__init__.py | 0 | ||||
-rw-r--r-- | test/engine/alltests.py | 28 | ||||
-rw-r--r-- | test/engine/autoconnect_engine.py (renamed from test/autoconnect_engine.py) | 0 | ||||
-rw-r--r-- | test/engine/parseconnect.py (renamed from test/parseconnect.py) | 0 | ||||
-rw-r--r-- | test/engine/pool.py (renamed from test/pool.py) | 0 | ||||
-rw-r--r-- | test/engine/proxy_engine.py (renamed from test/proxy_engine.py) | 0 | ||||
-rw-r--r-- | test/engine/reflection.py (renamed from test/reflection.py) | 0 | ||||
-rw-r--r-- | test/engine/transaction.py (renamed from test/transaction.py) | 0 | ||||
-rw-r--r-- | test/ext/__init__.py | 0 | ||||
-rw-r--r-- | test/ext/activemapper.py (renamed from test/activemapper.py) | 0 | ||||
-rw-r--r-- | test/ext/alltests.py | 19 | ||||
-rw-r--r-- | test/ext/legacy_objectstore.py (renamed from test/legacy_objectstore.py) | 0 | ||||
-rw-r--r-- | test/ext/sqlsoup.py (renamed from test/sqlsoup.py) | 0 | ||||
-rw-r--r-- | test/ext/wsgi_test.py (renamed from test/wsgi_test.py) | 0 | ||||
-rw-r--r-- | test/orm/__init__.py | 0 | ||||
-rw-r--r-- | test/orm/alltests.py | 39 | ||||
-rw-r--r-- | test/orm/association.py (renamed from test/association.py) | 0 | ||||
-rw-r--r-- | test/orm/cascade.py (renamed from test/cascade.py) | 0 | ||||
-rw-r--r-- | test/orm/cycles.py (renamed from test/cycles.py) | 0 | ||||
-rw-r--r-- | test/orm/eagertest1.py (renamed from test/eagertest1.py) | 0 | ||||
-rw-r--r-- | test/orm/eagertest2.py (renamed from test/eagertest2.py) | 0 | ||||
-rw-r--r-- | test/orm/entity.py (renamed from test/entity.py) | 0 | ||||
-rw-r--r-- | test/orm/inheritance.py (renamed from test/inheritance.py) | 0 | ||||
-rw-r--r-- | test/orm/inheritance2.py (renamed from test/inheritance2.py) | 0 | ||||
-rw-r--r-- | test/orm/inheritance3.py (renamed from test/inheritance3.py) | 0 | ||||
-rw-r--r-- | test/orm/lazytest1.py (renamed from test/lazytest1.py) | 0 | ||||
-rw-r--r-- | test/orm/manytomany.py (renamed from test/manytomany.py) | 0 | ||||
-rw-r--r-- | test/orm/mapper.py (renamed from test/mapper.py) | 0 | ||||
-rw-r--r-- | test/orm/objectstore.py (renamed from test/objectstore.py) | 0 | ||||
-rw-r--r-- | test/orm/onetoone.py (renamed from test/onetoone.py) | 0 | ||||
-rw-r--r-- | test/orm/poly_linked_list.py (renamed from test/poly_linked_list.py) | 0 | ||||
-rw-r--r-- | test/orm/polymorph.py (renamed from test/polymorph.py) | 0 | ||||
-rw-r--r-- | test/orm/relationships.py (renamed from test/relationships.py) | 0 | ||||
-rw-r--r-- | test/orm/selectresults.py (renamed from test/selectresults.py) | 0 | ||||
-rw-r--r-- | test/orm/sessioncontext.py (renamed from test/sessioncontext.py) | 0 | ||||
-rw-r--r-- | test/perf/masscreate.py (renamed from test/masscreate.py) | 0 | ||||
-rw-r--r-- | test/perf/masscreate2.py (renamed from test/masscreate2.py) | 0 | ||||
-rw-r--r-- | test/perf/massload.py (renamed from test/massload.py) | 0 | ||||
-rw-r--r-- | test/sql/__init__.py | 0 | ||||
-rw-r--r-- | test/sql/alltests.py | 32 | ||||
-rw-r--r-- | test/sql/case_statement.py (renamed from test/case_statement.py) | 0 | ||||
-rw-r--r-- | test/sql/defaults.py (renamed from test/defaults.py) | 0 | ||||
-rw-r--r-- | test/sql/indexes.py (renamed from test/indexes.py) | 0 | ||||
-rw-r--r-- | test/sql/query.py (renamed from test/query.py) | 0 | ||||
-rw-r--r-- | test/sql/select.py (renamed from test/select.py) | 0 | ||||
-rwxr-xr-x | test/sql/selectable.py (renamed from test/selectable.py) | 0 | ||||
-rw-r--r-- | test/sql/testtypes.py (renamed from test/testtypes.py) | 8 |
53 files changed, 155 insertions, 63 deletions
diff --git a/test/alltests.py b/test/alltests.py index 183fc1492..147d26d2c 100644 --- a/test/alltests.py +++ b/test/alltests.py @@ -1,71 +1,16 @@ import testbase import unittest -def suite(): - modules_to_test = ( - # core utilities - 'historyarray', - 'attributes', - 'dependency', - - # connectivity, execution - 'pool', - 'transaction', - - # schema/tables - 'reflection', - 'testtypes', - 'indexes', +import orm.alltests as orm +import base.alltests as base +import sql.alltests as sql +import engine.alltests as engine +import ext.alltests as ext - # SQL syntax - 'select', - 'selectable', - 'case_statement', - - # assorted round-trip tests - 'query', - - # defaults, sequences (postgres/oracle) - 'defaults', - - # ORM selecting - 'mapper', - 'selectresults', - 'lazytest1', - 'eagertest1', - 'eagertest2', - - # ORM persistence - 'sessioncontext', - 'objectstore', - 'cascade', - 'relationships', - 'association', - - # cyclical ORM persistence - 'cycles', - 'poly_linked_list', - - # more select/persistence, backrefs - 'entity', - 'manytomany', - 'onetoone', - 'inheritance', - 'inheritance2', - 'inheritance3', - 'polymorph', - - # extensions - 'proxy_engine', - 'activemapper', - 'sqlsoup' - - #'wsgi_test', - - ) +def suite(): alltests = unittest.TestSuite() - for module in map(__import__, modules_to_test): - alltests.addTest(unittest.findTestCases(module, suiteClass=None)) + for suite in (base, engine, sql, orm, ext): + alltests.addTest(suite.suite()) return alltests diff --git a/test/base/__init__.py b/test/base/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/base/__init__.py diff --git a/test/base/alltests.py b/test/base/alltests.py new file mode 100644 index 000000000..2ef5b8794 --- /dev/null +++ b/test/base/alltests.py @@ -0,0 +1,21 @@ +import testbase +import unittest + +def suite(): + modules_to_test = ( + # core utilities + 'base.historyarray', + 'base.attributes', + 'base.dependency', + ) + alltests = unittest.TestSuite() + for name in modules_to_test: + mod = __import__(name) + for token in name.split('.')[1:]: + mod = getattr(mod, token) + alltests.addTest(unittest.findTestCases(mod, suiteClass=None)) + return alltests + + +if __name__ == '__main__': + testbase.runTests(suite()) diff --git a/test/attributes.py b/test/base/attributes.py index bff864fa6..bff864fa6 100644 --- a/test/attributes.py +++ b/test/base/attributes.py diff --git a/test/dependency.py b/test/base/dependency.py index d2b5bd698..d2b5bd698 100644 --- a/test/dependency.py +++ b/test/base/dependency.py diff --git a/test/historyarray.py b/test/base/historyarray.py index 9fc270432..9fc270432 100644 --- a/test/historyarray.py +++ b/test/base/historyarray.py diff --git a/test/engine/__init__.py b/test/engine/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/engine/__init__.py diff --git a/test/engine/alltests.py b/test/engine/alltests.py new file mode 100644 index 000000000..c63cb2861 --- /dev/null +++ b/test/engine/alltests.py @@ -0,0 +1,28 @@ +import testbase +import unittest + + +def suite(): + modules_to_test = ( + # connectivity, execution + 'engine.parseconnect', + 'engine.pool', + 'engine.transaction', + + # schema/tables + 'engine.reflection', + + 'engine.proxy_engine' + ) + alltests = unittest.TestSuite() + for name in modules_to_test: + mod = __import__(name) + for token in name.split('.')[1:]: + mod = getattr(mod, token) + alltests.addTest(unittest.findTestCases(mod, suiteClass=None)) + return alltests + + + +if __name__ == '__main__': + testbase.runTests(suite()) diff --git a/test/autoconnect_engine.py b/test/engine/autoconnect_engine.py index 39bcf3e53..39bcf3e53 100644 --- a/test/autoconnect_engine.py +++ b/test/engine/autoconnect_engine.py diff --git a/test/parseconnect.py b/test/engine/parseconnect.py index 43389c272..43389c272 100644 --- a/test/parseconnect.py +++ b/test/engine/parseconnect.py diff --git a/test/pool.py b/test/engine/pool.py index 9a8c7cffd..9a8c7cffd 100644 --- a/test/pool.py +++ b/test/engine/pool.py diff --git a/test/proxy_engine.py b/test/engine/proxy_engine.py index df0c64398..df0c64398 100644 --- a/test/proxy_engine.py +++ b/test/engine/proxy_engine.py diff --git a/test/reflection.py b/test/engine/reflection.py index 85c97d704..85c97d704 100644 --- a/test/reflection.py +++ b/test/engine/reflection.py diff --git a/test/transaction.py b/test/engine/transaction.py index 408c9dc99..408c9dc99 100644 --- a/test/transaction.py +++ b/test/engine/transaction.py diff --git a/test/ext/__init__.py b/test/ext/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/ext/__init__.py diff --git a/test/activemapper.py b/test/ext/activemapper.py index 6a8b0904e..6a8b0904e 100644 --- a/test/activemapper.py +++ b/test/ext/activemapper.py diff --git a/test/ext/alltests.py b/test/ext/alltests.py new file mode 100644 index 000000000..67513f032 --- /dev/null +++ b/test/ext/alltests.py @@ -0,0 +1,19 @@ +import testbase +import unittest + +def suite(): + modules_to_test = ( + 'ext.activemapper', + 'ext.sqlsoup' + ) + alltests = unittest.TestSuite() + for name in modules_to_test: + mod = __import__(name) + for token in name.split('.')[1:]: + mod = getattr(mod, token) + alltests.addTest(unittest.findTestCases(mod, suiteClass=None)) + return alltests + + +if __name__ == '__main__': + testbase.runTests(suite()) diff --git a/test/legacy_objectstore.py b/test/ext/legacy_objectstore.py index 3aa99a1ae..3aa99a1ae 100644 --- a/test/legacy_objectstore.py +++ b/test/ext/legacy_objectstore.py diff --git a/test/sqlsoup.py b/test/ext/sqlsoup.py index 4d4dbb69a..4d4dbb69a 100644 --- a/test/sqlsoup.py +++ b/test/ext/sqlsoup.py diff --git a/test/wsgi_test.py b/test/ext/wsgi_test.py index 1330f88b6..1330f88b6 100644 --- a/test/wsgi_test.py +++ b/test/ext/wsgi_test.py diff --git a/test/orm/__init__.py b/test/orm/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/orm/__init__.py diff --git a/test/orm/alltests.py b/test/orm/alltests.py new file mode 100644 index 000000000..4c038f122 --- /dev/null +++ b/test/orm/alltests.py @@ -0,0 +1,39 @@ +import testbase +import unittest + +def suite(): + modules_to_test = ( + 'orm.mapper', + 'orm.selectresults', + 'orm.lazytest1', + 'orm.eagertest1', + 'orm.eagertest2', + + 'orm.sessioncontext', + 'orm.objectstore', + 'orm.cascade', + 'orm.relationships', + 'orm.association', + + 'orm.cycles', + 'orm.poly_linked_list', + + 'orm.entity', + 'orm.manytomany', + 'orm.onetoone', + 'orm.inheritance', + 'orm.inheritance2', + 'orm.inheritance3', + 'orm.polymorph' + ) + alltests = unittest.TestSuite() + for name in modules_to_test: + mod = __import__(name) + for token in name.split('.')[1:]: + mod = getattr(mod, token) + alltests.addTest(unittest.findTestCases(mod, suiteClass=None)) + return alltests + + +if __name__ == '__main__': + testbase.runTests(suite()) diff --git a/test/association.py b/test/orm/association.py index e33151ed4..e33151ed4 100644 --- a/test/association.py +++ b/test/orm/association.py diff --git a/test/cascade.py b/test/orm/cascade.py index 4a997d67f..4a997d67f 100644 --- a/test/cascade.py +++ b/test/orm/cascade.py diff --git a/test/cycles.py b/test/orm/cycles.py index fb051f47a..fb051f47a 100644 --- a/test/cycles.py +++ b/test/orm/cycles.py diff --git a/test/eagertest1.py b/test/orm/eagertest1.py index 9765379f4..9765379f4 100644 --- a/test/eagertest1.py +++ b/test/orm/eagertest1.py diff --git a/test/eagertest2.py b/test/orm/eagertest2.py index ef385df16..ef385df16 100644 --- a/test/eagertest2.py +++ b/test/orm/eagertest2.py diff --git a/test/entity.py b/test/orm/entity.py index f425c5c8e..f425c5c8e 100644 --- a/test/entity.py +++ b/test/orm/entity.py diff --git a/test/inheritance.py b/test/orm/inheritance.py index 095763867..095763867 100644 --- a/test/inheritance.py +++ b/test/orm/inheritance.py diff --git a/test/inheritance2.py b/test/orm/inheritance2.py index c6b9f0198..c6b9f0198 100644 --- a/test/inheritance2.py +++ b/test/orm/inheritance2.py diff --git a/test/inheritance3.py b/test/orm/inheritance3.py index 2f029e64f..2f029e64f 100644 --- a/test/inheritance3.py +++ b/test/orm/inheritance3.py diff --git a/test/lazytest1.py b/test/orm/lazytest1.py index eb1310d66..eb1310d66 100644 --- a/test/lazytest1.py +++ b/test/orm/lazytest1.py diff --git a/test/manytomany.py b/test/orm/manytomany.py index 92b7efb26..92b7efb26 100644 --- a/test/manytomany.py +++ b/test/orm/manytomany.py diff --git a/test/mapper.py b/test/orm/mapper.py index d4225d412..d4225d412 100644 --- a/test/mapper.py +++ b/test/orm/mapper.py diff --git a/test/objectstore.py b/test/orm/objectstore.py index 442ee9f4d..442ee9f4d 100644 --- a/test/objectstore.py +++ b/test/orm/objectstore.py diff --git a/test/onetoone.py b/test/orm/onetoone.py index 5dc5b1204..5dc5b1204 100644 --- a/test/onetoone.py +++ b/test/orm/onetoone.py diff --git a/test/poly_linked_list.py b/test/orm/poly_linked_list.py index 0dfeb3184..0dfeb3184 100644 --- a/test/poly_linked_list.py +++ b/test/orm/poly_linked_list.py diff --git a/test/polymorph.py b/test/orm/polymorph.py index ec7e95a0a..ec7e95a0a 100644 --- a/test/polymorph.py +++ b/test/orm/polymorph.py diff --git a/test/relationships.py b/test/orm/relationships.py index 4aac8a290..4aac8a290 100644 --- a/test/relationships.py +++ b/test/orm/relationships.py diff --git a/test/selectresults.py b/test/orm/selectresults.py index 3f5bcff92..3f5bcff92 100644 --- a/test/selectresults.py +++ b/test/orm/selectresults.py diff --git a/test/sessioncontext.py b/test/orm/sessioncontext.py index 83bc2f2bf..83bc2f2bf 100644 --- a/test/sessioncontext.py +++ b/test/orm/sessioncontext.py diff --git a/test/masscreate.py b/test/perf/masscreate.py index 5f99bb6c1..5f99bb6c1 100644 --- a/test/masscreate.py +++ b/test/perf/masscreate.py diff --git a/test/masscreate2.py b/test/perf/masscreate2.py index f261f832c..f261f832c 100644 --- a/test/masscreate2.py +++ b/test/perf/masscreate2.py diff --git a/test/massload.py b/test/perf/massload.py index d36746968..d36746968 100644 --- a/test/massload.py +++ b/test/perf/massload.py diff --git a/test/sql/__init__.py b/test/sql/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/test/sql/__init__.py diff --git a/test/sql/alltests.py b/test/sql/alltests.py new file mode 100644 index 000000000..23a7a6236 --- /dev/null +++ b/test/sql/alltests.py @@ -0,0 +1,32 @@ +import testbase +import unittest + + +def suite(): + modules_to_test = ( + 'sql.testtypes', + 'sql.indexes', + + # SQL syntax + 'sql.select', + 'sql.selectable', + 'sql.case_statement', + + # assorted round-trip tests + 'sql.query', + + # defaults, sequences (postgres/oracle) + 'sql.defaults', + ) + alltests = unittest.TestSuite() + for name in modules_to_test: + mod = __import__(name) + for token in name.split('.')[1:]: + mod = getattr(mod, token) + alltests.addTest(unittest.findTestCases(mod, suiteClass=None)) + return alltests + + + +if __name__ == '__main__': + testbase.runTests(suite()) diff --git a/test/case_statement.py b/test/sql/case_statement.py index fc0e919a5..fc0e919a5 100644 --- a/test/case_statement.py +++ b/test/sql/case_statement.py diff --git a/test/defaults.py b/test/sql/defaults.py index 57b4388a1..57b4388a1 100644 --- a/test/defaults.py +++ b/test/sql/defaults.py diff --git a/test/indexes.py b/test/sql/indexes.py index f1e55e406..f1e55e406 100644 --- a/test/indexes.py +++ b/test/sql/indexes.py diff --git a/test/query.py b/test/sql/query.py index 2148aae67..2148aae67 100644 --- a/test/query.py +++ b/test/sql/query.py diff --git a/test/select.py b/test/sql/select.py index 19d39e41f..19d39e41f 100644 --- a/test/select.py +++ b/test/sql/select.py diff --git a/test/selectable.py b/test/sql/selectable.py index 0c2aa1b56..0c2aa1b56 100755 --- a/test/selectable.py +++ b/test/sql/selectable.py diff --git a/test/testtypes.py b/test/sql/testtypes.py index db1fbca20..f369bd384 100644 --- a/test/testtypes.py +++ b/test/sql/testtypes.py @@ -4,6 +4,14 @@ from testbase import PersistTest, AssertMixin import testbase import sqlalchemy.engine.url as url +import sqlalchemy.types + +# TODO: cant get cPickle to pickle the "Foo" class from this module, +# now that its moved +import pickle +sqlalchemy.types.pickle = pickle + + db = testbase.db class MyType(types.TypeEngine): |