forked from w3c/feedvalidator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntest.py
More file actions
28 lines (25 loc) · 754 Bytes
/
runtest.py
File metadata and controls
28 lines (25 loc) · 754 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
modules = [
'testFeedvalidator',
'testUri',
'testXmlEncoding',
'testXmlEncodingDecode',
'testMediaTypes',
'testHowtoNs',
'testValidators',
'validtest',
'mkmsgs',
]
if __name__ == '__main__':
import os, sys, unittest
srcdir = os.path.join(os.path.dirname(os.path.abspath(__file__)),'src')
testdir = os.path.join(srcdir,'tests')
xdocsdir = os.path.join(os.path.dirname(srcdir),'docs-xml')
sys.path.insert(0,srcdir)
sys.path.insert(0,testdir)
sys.path.insert(0,xdocsdir)
suite = unittest.TestSuite()
for module in modules:
suite.addTest(__import__(module).buildTestSuite())
ttr = unittest.TextTestRunner().run(suite)
if not ttr.wasSuccessful():
sys.exit(10)