]> rtime.felk.cvut.cz Git - wvtest.git/commit
python: wvtest scripts can now be executable, like unittest scripts.
authorAvery Pennarun <apenwarr@gmail.com>
Tue, 14 Aug 2012 06:31:04 +0000 (02:31 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Tue, 14 Aug 2012 07:11:07 +0000 (03:11 -0400)
commitc2197e2caeda8dd8c2dc3dbe5df1eaa7cd177aa1
treea627710408f37bc6c8440e3cb7750bba3d20fd9d
parent986215d1ac52aed4c95090c7a18cd7f4736c726a
python: wvtest scripts can now be executable, like unittest scripts.

Now you can either do:
./wvtest.py t/mytest.py
or
python t/mytest.py

If you want to do the latter, you need lines like this at the end of
mytest.py:
if __name__ == '__main__':
    wvtest_main()

This makes it work more like the python standard unittest library, and makes
it really obvious how to run any given test file from the command line,
independent from the others.
python/Makefile
python/t/__init__.py
python/t/twvtest.py
python/t/twvtest2.py [new file with mode: 0644]
python/wvtest.py