jeudi 2 mars 2017

Make python load module from different source in test

Having function my_func which loads something from module_a, what I need to alter so that in my test module_a substituted for another module without altering anything except tests or builtin modules?

End result should be that my_func gets module which I inserted in my test, not original module which it usually gets

Aucun commentaire:

Enregistrer un commentaire