frank: thuban/test test_load.py,1.39,1.40
Bernhard Herzog
bh at intevation.de
Mon Dec 13 17:30:06 CET 2004
Frank Koormann <frank.koormann at intevation.de> writes:
>> 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?
[...]
> 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.
No. If loading the session fails you get an exception from
load_session.
> This will cause an error when trying to issue
> self.session.Destroy().
It won't catch other things, though. The loader could cope with missing
shapefiles by removing those shapestores and anything that depends on
them from the session instead of calling the callback. That would still
return a valid session object and the test would still pass.
> So IMHO the test does testing.
It only tests whether load_session does not raise errors. That's not
enough IMO.
> If I find the time I can smooth the test
> to actually check for some session attributes.
That would be better.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)