Tracking Python program flow in smoke test

321 views Asked by At

I am writing a smoke test solution for a Python project I am working on. The software to be tested uses GObject.MainLoop, and I have written a test mode into it in which a function containing the test code is scheduled to be run before entering the event loop. That works the way I want.

What I am still looking for is a way to observe whether the program flow triggered by a test has reached certain point in the code i.e. whether an instance method of a class has been called. If I could do that, I could run a series of smoke tests with no need to know how long time each test takes to run.

What options do I have for doing that? Or are there any? Would it make this any easier if I were not observing whether an instance method has been called but something else? What could that be? I would also like to minimize the pollution of code by test code.

0

There are 0 answers