Revision 369,
1.1 KB
checked in by eliedebrauwer, 10 years ago
(diff) |
Ticket #147. Patch by eliedebrauwer: Added dialogue-validator code and unittests, already capable of structure checking. Unittest fail atm. Still pending for ticket 147 is a standalone validator. comment[s:trac, t:147]
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | # This program is free software: you can redistribute it and/or modify |
---|
4 | # it under the terms of the GNU General Public License as published by |
---|
5 | # the Free Software Foundation, either version 3 of the License, or |
---|
6 | # (at your option) any later version. |
---|
7 | |
---|
8 | # This program is distributed in the hope that it will be useful, |
---|
9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
11 | # GNU General Public License for more details. |
---|
12 | |
---|
13 | # You should have received a copy of the GNU General Public License |
---|
14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
15 | |
---|
16 | |
---|
17 | import sys, os, unittest |
---|
18 | |
---|
19 | def _jp(path): |
---|
20 | return os.path.sep.join(path.split('/')) |
---|
21 | |
---|
22 | _paths = ('../../engine/swigwrappers/python', '../../engine/extensions','tests') |
---|
23 | test_suite = unittest.TestSuite() |
---|
24 | |
---|
25 | for p in _paths: |
---|
26 | if p not in sys.path: |
---|
27 | sys.path.append(_jp(p)) |
---|
28 | |
---|
29 | for p in os.listdir("tests") : |
---|
30 | if p[-3:] == ".py" : |
---|
31 | test_suite.addTest(unittest.TestLoader().loadTestsFromName(p[:-3])) |
---|
32 | |
---|
33 | unittest.TextTestRunner(verbosity=2).run(test_suite) |
---|
Note: See
TracBrowser
for help on using the repository browser.