-
Notifications
You must be signed in to change notification settings - Fork 15
/
test.py
35 lines (30 loc) · 1.35 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Load tests"""
import doctest
import unittest
from snowballing import dbindex, utils, models, config, operations, snowballing
from snowballing import jupyter_utils, approaches, strategies, config_helpers
from snowballing import collection_helpers
from pathlib import Path
from snowballing.example import database
flags = doctest.REPORT_ONLY_FIRST_FAILURE
suites = []
suites.append(doctest.DocTestSuite(dbindex, optionflags=flags))
suites.append(doctest.DocTestSuite(utils, optionflags=flags))
suites.append(doctest.DocTestSuite(models, optionflags=flags))
suites.append(doctest.DocTestSuite(operations, optionflags=flags))
suites.append(doctest.DocTestSuite(config_helpers, optionflags=flags))
suites.append(doctest.DocTestSuite(snowballing, optionflags=flags))
suites.append(doctest.DocTestSuite(jupyter_utils, optionflags=flags))
suites.append(doctest.DocTestSuite(approaches, optionflags=flags))
suites.append(doctest.DocTestSuite(strategies, optionflags=flags))
suites.append(doctest.DocTestSuite(collection_helpers, optionflags=flags))
suites.append(doctest.DocTestSuite(config, optionflags=flags))
def load_tests(loader, tests, pattern):
"""Create test suite"""
# pylint: disable=unused-argument
suite = unittest.TestSuite()
for test_suite in suites:
suite.addTest(test_suite)
return suite
if __name__ == "__main__":
unittest.main()