'Delete modules that have been loaded during a test.
This allows the interpreter to catch module changes in case
the module is re-imported.'

def delete_loaded_modules(self):

    for name in set(sys.modules).difference(self._savemodulekeys):
        if (not name.startswith('zope')):
            del sys.modules[name]
