Edward d'Auvergne wrote:
Gary, I was wondering how the code in this new 'unit_test_runner.py'
file is executed? I can't work out how to run this code.
Cheers,
Edward
O
Hi Ed at the moment it is very crude (for testing and modularity purposes)
1. add the toplevel of of the test-suite branch to your python path
2. cd to test_suite/unit_tests
both test_float.py and unit_test_runner.py are executable
expected results are
./test_float.py
...
----------------------------------------------------------------------
Ran 3 tests in 0.002s
OK
./unit_test_runner.py
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests
['.svn'] ['test_float.py', 'test_float.py.bak', 'test_float.pyc',
'unit_test_runner.py', 'os,re,unittest,string,sys']
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn
['text-base', 'prop-base', 'props', 'wcprops', 'tmp'] ['entries',
'empty-file', 'README.txt', 'format']
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/text-base
[] ['test_float.py.svn-base', 'unit_test_runner.py.svn-base']
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/prop-base
[] ['test_float.py.svn-base']
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/props
[] ['test_float.py.svn-work']
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/wcprops
[] []
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/tmp
['text-base', 'prop-base', 'props', 'wcprops'] []
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/tmp/text-base
[] []
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/tmp/prop-base
[] []
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/tmp/props
[] []
/usr/jessy/home/garyt/projects/relax_branch/branch-test-suite/test_suite/unit_tests/.svn/tmp/wcprops
[] []
...
----------------------------------------------------------------------
Ran 3 tests in 0.002s
OK
obviously the search paths will be different...
regards
gary
n.b. I have just added some minor changes to make the files more
runable: revision 2794
--
-------------------------------------------------------------------
Dr Gary Thompson
Astbury Centre for Structural Molecular Biology,
University of Leeds, Astbury Building,
Leeds, LS2 9JT, West-Yorkshire, UK Tel. +44-113-3433024
email: garyt@xxxxxxxxxxxxxxx Fax +44-113-2331407
-------------------------------------------------------------------