mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-04 06:48:27 -04:00
790f3d44d9
- Promoted _reorder to reorder - Now horking docstrings of overloaded methods from list - Added a doctest
33 lines
880 B
Python
33 lines
880 B
Python
import testenv; testenv.configure_for_tests()
|
|
import doctest, sys, unittest
|
|
|
|
|
|
def suite():
|
|
unittest_modules = (
|
|
'ext.declarative',
|
|
'ext.orderinglist',
|
|
'ext.associationproxy',
|
|
)
|
|
|
|
if sys.version_info < (2, 4):
|
|
doctest_modules = ()
|
|
else:
|
|
doctest_modules = (
|
|
('sqlalchemy.ext.orderinglist', {'optionflags': doctest.ELLIPSIS}),
|
|
('sqlalchemy.ext.sqlsoup', {})
|
|
)
|
|
|
|
alltests = unittest.TestSuite()
|
|
for name in unittest_modules:
|
|
mod = __import__(name)
|
|
for token in name.split('.')[1:]:
|
|
mod = getattr(mod, token)
|
|
alltests.addTest(unittest.findTestCases(mod, suiteClass=None))
|
|
for name, opts in doctest_modules:
|
|
alltests.addTest(doctest.DocTestSuite(name, **opts))
|
|
return alltests
|
|
|
|
|
|
if __name__ == '__main__':
|
|
testenv.main(suite())
|