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: jsuch...@suse.cz
Lihovarská 1060/12                            tel: +420 284 028 960
190 00 Praha 9, Czech Republic                http://www.suse.cz
--
To unsubscribe, e-mail: yast-devel+unsubscr...@opensuse.org
For additional commands, e-mail: yast-devel+h...@opensuse.org

Reply via email to