#This file is part of python-sql.  The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import sys
import os
import unittest
import doctest

import sql

here = os.path.dirname(__file__)


def test_suite():
    suite = additional_tests()
    loader = unittest.TestLoader()
    for fn in os.listdir(here):
        if fn.startswith('test') and fn.endswith('.py'):
            modname = 'sql.tests.' + fn[:-3]
            __import__(modname)
            module = sys.modules[modname]
            suite.addTests(loader.loadTestsFromModule(module))
    return suite


def additional_tests():
    suite = unittest.TestSuite()
    for mod in (sql,):
        suite.addTest(doctest.DocTestSuite(mod))
    return suite


def main():
    suite = test_suite()
    runner = unittest.TextTestRunner()
    runner.run(suite)

if __name__ == '__main__':
    sys.path.insert(0, os.path.dirname(os.path.dirname(
                os.path.dirname(os.path.abspath(__file__)))))
    main()

@@ -237,16 +237,84 @@
 file__)%0A
+readme = os.path.normpath(os.path.join(here, '..', '..', 'README'))%0A
 %0A%0Adef te
@@ -810,16 +810,187 @@
 e(mod))%0A
+    if os.path.isfile(readme):%0A        suite.addTest(doctest.DocFileSuite(readme, module_relative=False,%0A                tearDown=lambda t: sql.Flavor.set(sql.Flavor())))%0A
     retu

Add README to test suite