Avoiding running top-level module code in unit test
Avoiding running top-level module code in unit test Question: I am attempting to unit test some Python 3 code that imports a module. Unfortunately, the way the module is written, simply importing it has unpleasant side effects, which are not important for the tests. I’m trying to use unitest.mock.patch to get around it, but not …