mardi 28 avril 2015

How to test the execution order of several functions in python?

I have several update functions. They must be executed in strict order.

For example

def update1(a1):
  do_something...

def update2(a1, a2):
  do_something...

def update3(a1):
  do_something...


def process(a,b):
  update1(a)
  update2(a,b)
  update3(a)

In process, all update functions must be executed in that order.

How to write a unit test to test the order of the executions inside process?


I am not asking the execution order of tests, not like these questions

Python unittest.TestCase execution order

Execution order on python unittest

Aucun commentaire:

Enregistrer un commentaire