mailRe: Unit tests for methods/objects in __init__.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on March 13, 2007 - 11:09:
Actually there should be 19 tests :)  There are 9 in
'data/test_mol_res_spin.py', 6 in 'data/test_diff_tensor.py', and 4 in
'data/__init__.py'.  Those of 'data/test_mol_res_spin.py' should now
work.

Cheers,

Edward


On 3/13/07, Gary S. Thompson <garyt@xxxxxxxxxxxxxxx> wrote:
Edward d'Auvergne wrote:

> Gary,
>
> I've written some unit tests which are located in the file
> 'test_suite/unit_tests/data/__init__.py'.  Would you know what
> modifications I need to apply to make these tests run?

Hi Ed

None ;-) I just tested them they are fine

e.g. in test_suite './unit_tests/unit_test_runner.py ./unit_tests/data'
runs 6 tests

The latest version of unit_test_runner  I have uploaded should be  able
to run tests from anywhere in the relax hierachy

e.g. in the relax main directory
./test_suite/unit_tests/unit_test_runner.py .test_suite/unit_tests/data
also works


> These tests > are for the methods of the Data singleton class (the relax data > storage object) which is located in 'data/__init__.py'. I haven't > used the statement 'from x import Data' for this class so it is the > legal and ubiquitous usage of an __init__.py file. Would > 'unit_test_runner.py' handle this code? > > Thanks, > > Edward > > > P.S. These tests demonstrate the utility of subclassing the singleton > and is one reason I was arguing for the use of the class import rather > than reference import.

Yep , haven't had a chance to have a look at this yet but will do

regards
gary

>
> _______________________________________________
> relax (http://nmr-relax.com)
>
> This is the relax-devel mailing list
> relax-devel@xxxxxxx
>
> To unsubscribe from this list, get a password
> reminder, or change your subscription options,
> visit the list information page at
> https://mail.gna.org/listinfo/relax-devel
>
> .
>


-- ------------------------------------------------------------------- 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 -------------------------------------------------------------------






Related Messages


Powered by MHonArc, Updated Wed Mar 14 12:40:37 2007