Revision 339,
1.1 KB
checked in by Kaydeth_parpg, 10 years ago
(diff) |
Ticket #121. Patch by Zenbitz. I hacked up the dialogue-demo.py script so that I could test my fguard.yaml file. There were lots of bugs! I had to add several callbacks and functions to the dummy objects in the demo script. I also modified it so that it will use a .yaml file as the first command line argument instead of hard-coded dialogues/sample.yaml (still the default).
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[339] | 1 | #!/usr/bin/env python |
---|
[284] | 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 | |
---|
[172] | 17 | import sys, os, unittest |
---|
| 18 | |
---|
| 19 | def _jp(path): |
---|
| 20 | return os.path.sep.join(path.split('/')) |
---|
| 21 | |
---|
[279] | 22 | _paths = ('../../engine/swigwrappers/python', '../../engine/extensions','tests') |
---|
| 23 | test_suite = unittest.TestSuite() |
---|
| 24 | |
---|
[172] | 25 | for p in _paths: |
---|
| 26 | if p not in sys.path: |
---|
| 27 | sys.path.append(_jp(p)) |
---|
| 28 | |
---|
[279] | 29 | for p in os.listdir("tests") : |
---|
| 30 | if p[-3:] == ".py" : |
---|
| 31 | test_suite.addTest(unittest.TestLoader().loadTestsFromName(p[:-3])) |
---|
[172] | 32 | |
---|
[279] | 33 | unittest.TextTestRunner(verbosity=2).run(test_suite) |
---|
Note: See
TracBrowser
for help on using the repository browser.