-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
33 lines (28 loc) · 889 Bytes
/
Copy pathtest.py
File metadata and controls
33 lines (28 loc) · 889 Bytes
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
import unittest
import test.remote
import test.local
import sys
import logging
def suite(inc_remote=False):
LOG = logging.getLogger()
LOG.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
#ch.setLevel(logging.INFO)
LOG.addHandler(ch)
suite = unittest.TestSuite()
suite.addTest(test.local.ApiClient.suite())
suite.addTest(test.local.Rest.suite())
suite.addTest(test.local.OpenURL.suite())
suite.addTest(test.local.xml2obj.suite())
if inc_remote:
suite.addTest(test.remote.Rest.suite())
suite.addTest(test.remote.OpenURL.suite())
return suite
include_remote_tests = False
if len(sys.argv) > 1:
if sys.argv[1] == 'remote':
print 'Including Remote tests.'
include_remote_tests = True
runner = unittest.TextTestRunner(verbosity=2)
runner.run(suite(include_remote_tests))