source: trunk/game/run_tests.py @ 684

Revision 674, 1.1 KB checked in by technomage, 9 years ago (diff)

Patch by Technomage

  • Modified the sha-bang line (#!) of the top-level entry scripts to search for python2 rather than python, since some linux systems now default to python 3.x which would break PARPG on those systems.
  • Some general cleanup of the dialogue_demo.py script.
  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/usr/bin/env python2
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
17import sys, os, unittest
18
19def _jp(path):
20    return os.path.sep.join(path.split('/'))
21
22_paths = ('../../engine/swigwrappers/python', '../../engine/extensions','tests')
23test_suite = unittest.TestSuite()
24
25for p in _paths:
26    if p not in sys.path:
27        sys.path.append(_jp(p))
28
29for p in os.listdir("tests") :
30    if p[-3:] == ".py" :
31        test_suite.addTest(unittest.TestLoader().loadTestsFromName(p[:-3]))
32
33unittest.TextTestRunner(verbosity=2).run(test_suite)
Note: See TracBrowser for help on using the repository browser.