comparison tests/extension_tests/extension_test_utils.py @ 0:4a0efb7baf70

* Datasets becomes the new trunk and retires after that :-)
author mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 29 Jun 2008 18:44:17 +0000
parents
children dfd48d49c044
comparison
equal deleted inserted replaced
-1:000000000000 0:4a0efb7baf70
1 #!/usr/bin/env python
2 import os, sys, unittest
3
4 def genpath(somepath):
5 return os.path.sep.join(somepath.split('/'))
6
7 _paths = ('engine/swigwrappers/python', 'engine/extensions')
8 for p in _paths:
9 if p not in sys.path:
10 sys.path.append(os.path.sep.join(p.split('/')))
11
12 import fife, fifelog
13
14 def getEngine(minimized=False):
15 e = fife.Engine()
16 log = fifelog.LogManager(e, promptlog=False, filelog=True)
17 log.setVisibleModules('all')
18 s = e.getSettings()
19 s.setDefaultFontPath('tests/data/FreeMono.ttf')
20 s.setDefaultFontGlyphs(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" +
21 ".,!?-+/:();%`'*#=[]")
22 if minimized:
23 s.setScreenWidth(1)
24 s.setScreenHeight(1)
25 s.setDefaultFontSize(12)
26 e.init()
27 return e
28
29 __all__ = []
30 __all__.append('unittest')
31 __all__.append('fife')
32 __all__.append('fifelog')
33 __all__.append('genpath')
34 __all__.append('getEngine')