Mailinglist Archive: yast-devel (4 mails)

< Previous Next >
[yast-devel] yast mocking module - problem with replacing function
Hi Yast Hackers,
as part of my attempt to improve testability of yast code, I hack on mocking
module. My goal is to allow writing test code in ruby ( that contain cool
testing frameworks ) and only missing part is mocking, because I need to mock
it in ycp ( or other bindings ) and stubba works only on ruby code.

My code ( in non-working state ) is available at [1]. Everything works, except
that it doesn't work :) To give overview I create mock stub call and that
deploy proxy component, namespace and function. All parts just provide hooking
and if it is called with interesting call, then it replace evaluation with stub
result. I write also test case to verify it and it doesn't work ( to work, it
needs modified yast-core which allow component replacement in ComponentBroker
and Import and git version of ruby bindings that contain fix for camel case ycp
modules ).

Problem from debugging looks like inside ycp bytecode that preresolve namespace
evaluation and calling component broker or Import is not take in effect. Am I
right? Does anyone see what is wrong and if it is at all possible to implement

Thanks for any response


P.S. If it looks good, I would like to include it also to SP3 and allow easy
unit testing for our fixes for SP3.

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
This Thread
  • No further messages