Dne 20.6.2011 17:53, Martin Vidner napsal(a):

> BTW it is a secret little feature of yast2-core that defining the
> environment variable Y2ALLGLOBAL makes all functions in a module
> global. It is enabled during the tests, so wagon_helpers.ycp just
> because of the tests is unnecessary.

I actually remembered that feature when I was writing the test.

The reason why the function has been put into a separate file is that Wagon.ycp
includes many other modules and at least one of them is doing something nasty 
in the
constructor (reading some values from system) and that prevents from reliable 
testing.

So to all developers: think about testing when writing a module constructor!
It cannot be skipped/mocked/stubbed in YCP!


--

Best Regards

Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o.                              e-mail: [email protected]
Lihovarská 1060/12                              tel: +420 284 028 960
190 00 Prague 9                                 fax: +420 284 028 951
Czech Republic                                  http://www.suse.cz/
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to