Mailinglist Archive: yast-devel (121 mails)

< Previous Next >
[yast-devel] testing functions using Pkg calls
This actually relates to 'Changing the Attitude to Coding YaST' topic.

I wanted to cover some of the new ycp code with tests, but I failed because my
new functions rely on Pkg:: interface. And, guess what - we do not have a way
to mock Pkg.

In the old days, this was (kind of) possible, see Pkg.ycp in testsuite/src
which defined basically empty return values:

global define boolean ActivateSelections () { return true;}

Well, it did not allow us to let it return specific values, which would be
really the best option. But at least it did not start package manager during
testing.

Would it make sense to revive this? Or to even enable real mocking of Pkg?
Or is it waste of the effort, which we should rather invest into the new
YaST++ project?

Jiri

--
Jiri Suchomel

SUSE LINUX, s.r.o. e-mail: jsuchome@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Praha 9, Czech Republic http://www.suse.cz
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups