File: test.py

package info (click to toggle)
python-pattern 2.6%2Bgit20150109-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 78,672 kB
  • sloc: python: 53,865; xml: 11,965; ansic: 2,318; makefile: 94
file content (42 lines) | stat: -rw-r--r-- 1,311 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
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
import unittest

import test_metrics
import test_web
import test_db
import test_de
import test_en
import test_es
import test_fr
import test_it
import test_nl
import test_text
import test_search
import test_vector
import test_graph

#---------------------------------------------------------------------------------------------------
# Run all tests.
# pattern.db tests require a valid username and password for MySQL.
# pattern.web tests require a working internet connection 
# and API license keys (see pattern.web.api.py) for Google and Yahoo API's.

def suite():
    suite = unittest.TestSuite()
    suite.addTest(test_metrics.suite())
    suite.addTest(test_web.suite())
    suite.addTest(test_db.suite(host="localhost", port=3306, username="root", password=""))
    suite.addTest(test_de.suite())
    suite.addTest(test_en.suite())
    suite.addTest(test_es.suite())
    suite.addTest(test_fr.suite())
    suite.addTest(test_it.suite())
    suite.addTest(test_nl.suite())
    suite.addTest(test_text.suite())
    suite.addTest(test_search.suite())
    suite.addTest(test_vector.suite())
    suite.addTest(test_graph.suite())
    return suite

if __name__ == "__main__":
    unittest.TextTestRunner(verbosity=1).run(suite())