Edward d'Auvergne wrote:
On 3/15/07, Gary S. Thompson <garyt@xxxxxxxxxxxxxxx> wrote:
> Edward d'Auvergne wrote:
>
> > Hi,
> >
> > Thank you very much for your efforts. The unit test framework is
> > running very smoothly. There are two features or points which I
could
> > handle if you would like. The first is the addition of cross
platform
> > compatibility with paths, directory separators, etc. This I
should be
> > able to fix up quickly.
>
> I will try a run on my windows box at home at some point
I can make the modifications if you like. After reading
http://docs.python.org/lib/os-path.html I noticed that even the
current directory '.' is not a constant, in Mac OS 9 it is actually
the colon ':'!
go ahead an i will have a look at the diffs and see if I cans
seeanything else
(nb is there a side by side diff untility for svn?)
regards
gary
n.b. there is at least one place where '.' is used as an implicit
constant and not put into a path
n.b. it might be a good idea if the unix syntax always works if possible
because that allows cross platform compatability. note support for unix
pathes is a part of the python paradigm
cf
*normpath*( path)
Normalize a pathname. This collapses redundant separators and
up-level references so that |A//B|, |A/./B| and |A/foo/../B| all
become |A/B|. It does not normalize the case (use normcase() for
that). On Windows, it converts forward slashes to backward slashes.
It should be understood that this may change the meaning of the path
if it contains symbolic links!
as an example
I've already done a lot of this portability stuff in
the rest of relax so I can quickly go through and make all necessary
changes.
> > The second may take a small redesign of the
> > code for searching for unit tests. At the moment there appears
to be
> > no technique for running unit tests for functions or class methods
> > located within the relax '__init__.py' files. For example in the
> > current revision of the 1.3 line (r3199), there is the file
> > 'test_suite/unit_tests/data/test___init__.py' which contains unit
> > tests for the class methods of the relax data storage singleton
in the
> > relax file 'data/__init__.py'. If you like, I could have a go at
> > fixing this.
> >
> Hum interesting I will need to think about this. If you can see a
simple
> solution go for it and I can have a look at the results otherwise
Imore
> will think about it soon (next 2-3 days)
I have analysed the problem here and there are two things
1. the test case for a file called test___init__.py is currently assumed
to be the class Test___init__(TestCase)
2. python will not accept classnames with trailing spaces (try it it's true!
regards
gary
I'll have to think about the problem as well :)
Cheers,
Edward
.
--
-------------------------------------------------------------------
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
-------------------------------------------------------------------