frank: thuban/test test_load.py,1.39,1.40
Frank Koormann
frank.koormann at intevation.de
Mon Dec 13 16:39:13 CET 2004
* Bernhard Herzog <bh at intevation.de> [041213 16:15]:
> > Index: test_load.py
> > ===================================================================
> > RCS file: /thubanrepository/thuban/test/test_load.py,v
> > retrieving revision 1.39
> > retrieving revision 1.40
> > diff -u -d -r1.39 -r1.40
> > --- test_load.py 3 Oct 2004 20:49:24 -0000 1.39
> > +++ test_load.py 13 Dec 2004 11:52:34 -0000 1.40
> [...]
> > + def test_01_single_path_error_fix(self):
[...]
>
> What's this test and the other new tests that never call an assert*
> method actually testing? How do you know the callback was called? How
> do you know the return values of the callback were actually honored?
>
> Also, the self.session.Destroy() call is not necessary. That's already
> taken care of by tearDown.
The test is relatively brute force: The defined session is not correct.
If load_session() and therewith SessionLoader.open_shapefile() fails,
self.session will be None. This will cause an error when trying to issue
self.session.Destroy().
So IMHO the test does testing. If I find the time I can smooth the test
to actually check for some session attributes.
Additionally I figured out that the explicit self.session.Destroy()
makes the test output clearer: If not called I get a bunch of messages
like
|0x413f250c LAYER_VISIBILITY_CHANGED
| method forward of <Thuban.Model.session.Session instance at 0x413701cc>
Seems as if the sessions are not destroyed early enough.
> Finally, there's no need to put numbers into the method names. The
> order in which the tests are executed should not matter at all.
These numbers make a difference in meaning of reporting. The GREAT-ER
version of runtest.py reports the doc strings of the tests and I like
these to be in a sensible order.
Frank
--
Frank Koormann <frank.koormann at intevation.de>
Professional Service around Free Software (http://intevation.net/)
FreeGIS Project (http://freegis.org/)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041213/00931e68/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)