Now using importlib
[szyfrow.git] / tests / test_doctests.py
1 import unittest
2 import doctest
3
4 import cipher.caesar
5 import cipher.affine
6 import cipher.keyword_cipher
7 import cipher.polybius
8 import cipher.column_transposition
9 import cipher.railfence
10 import cipher.cadenus
11 import cipher.hill
12 import cipher.amsco
13 import cipher.bifid
14 import cipher.autokey
15 import cipher.pocket_enigma
16
17 import support.language_models
18 import support.norms
19 import support.segment
20 import support.text_prettify
21 import support.utilities
22
23
24 def load_tests(loader, tests, ignore):
25 tests.addTests(doctest.DocTestSuite(cipher.caesar))
26 tests.addTests(doctest.DocTestSuite(cipher.affine))
27 tests.addTests(doctest.DocTestSuite(cipher.keyword_cipher))
28 tests.addTests(doctest.DocTestSuite(cipher.polybius))
29 tests.addTests(doctest.DocTestSuite(cipher.column_transposition))
30 tests.addTests(doctest.DocTestSuite(cipher.railfence))
31 tests.addTests(doctest.DocTestSuite(cipher.cadenus))
32 tests.addTests(doctest.DocTestSuite(cipher.hill))
33 tests.addTests(doctest.DocTestSuite(cipher.amsco))
34 tests.addTests(doctest.DocTestSuite(cipher.bifid))
35 tests.addTests(doctest.DocTestSuite(cipher.autokey))
36 tests.addTests(doctest.DocTestSuite(cipher.pocket_enigma,
37 extraglobs={'pe': cipher.pocket_enigma.PocketEnigma(1, 'a')}))
38
39 tests.addTests(doctest.DocTestSuite(support.language_models))
40 tests.addTests(doctest.DocTestSuite(support.norms))
41 tests.addTests(doctest.DocTestSuite(support.segment))
42 tests.addTests(doctest.DocTestSuite(support.text_prettify))
43 tests.addTests(doctest.DocTestSuite(support.utilities))
44
45 return tests