]> rtime.felk.cvut.cz Git - wvtest.git/blob - python/t/twvtest.py
Update wvtest.py to the new version that does os.chdir().
[wvtest.git] / python / t / twvtest.py
1 from wvtest import *
2
3 last=None
4
5 def _except(*args):
6     raise Exception(*args)
7
8 @wvtest
9 def test1():
10     WVPASSLT(1, 2)
11     WVPASSLE(1, 1)
12     WVPASSGT(2, 1)
13     WVPASSGE(2, 2)
14     WVEXCEPT(Exception, _except, 'my exception parameter')
15     
16     # ensure tests run in the order they were declared
17     global last
18     WVPASSEQ(last, None)
19     last='test1'
20
21 @wvtest
22 def booga2():
23     # ensure tests run in the order they were declared
24     global last
25     WVPASSEQ(last, 'test1')
26     last='booga2'
27     
28 @wvtest
29 def booga1():
30     # ensure tests run in the order they were declared
31     global last
32     WVPASSEQ(last, 'booga2')
33     last='booga1'
34
35
36 @wvtest
37 def chdir_test():
38     WVPASS(open('testfile.txt')) # will fail if chdir is wrong