File: __init__.py

package info (click to toggle)
python-sql 1.5.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 440 kB
  • sloc: python: 5,016; sh: 9; makefile: 7
file content (20 lines) | stat: -rw-r--r-- 675 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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 doctest
import os

import sql

here = os.path.dirname(__file__)
readme = os.path.normpath(os.path.join(here, '..', '..', 'README'))


def load_tests(loader, tests, pattern):
    tests.addTests(loader.discover(start_dir=here, pattern=pattern))
    for mod in (sql,):
        tests.addTest(doctest.DocTestSuite(mod))
    if os.path.isfile(readme):
        tests.addTest(doctest.DocFileSuite(
                readme, module_relative=False,
                tearDown=lambda t: sql.Flavor.set(sql.Flavor())))
    return tests