What's the best way to temporarily hide an installed module from a python script to test how it handles environments that don't have the module installed?
I'd like to avoid having to uninstall the module just to test.
Change  your Python Path.
The order of directories in sys.path shows the order of a search. 
You can change sys.path in a test to alter the search order.
Simulating lack of a dependency when testing a python script