5ecde6d
Use a context manager to patch sys.modules When not using the context manager, it causes the pytest process to not close after the tests have completed when the tests are run using Python 3.