'Create a complex environment with multiple entries on sys.path, akin to
a developer\'s environment who has a development (trunk) checkout of
Twisted, a system installed version of Twisted (for their operating
system\'s tools) and a project which provides Twisted plugins.'

def setUp(self):

    self.savedPath = sys.path[:]
    self.savedModules = sys.modules.copy()
    self.fakeRoot = FilePath(self.mktemp())
    self.fakeRoot.createDirectory()
    self.systemPath = self.fakeRoot.child('system_path')
    self.devPath = self.fakeRoot.child('development_path')
    self.appPath = self.fakeRoot.child('application_path')
    self.systemPackage = _createPluginDummy(self.systemPath, pluginFileContents('system'), True, 'plugindummy_builtin')
    self.devPackage = _createPluginDummy(self.devPath, pluginFileContents('dev'), True, 'plugindummy_builtin')
    self.appPackage = _createPluginDummy(self.appPath, pluginFileContents('app'), False, 'plugindummy_app')
    sys.path.extend([x.path for x in [self.systemPath, self.appPath]])
    self.getAllPlugins()
    self.sysplug = self.systemPath.child('plugindummy').child('plugins')
    self.syscache = self.sysplug.child('dropin.cache')
    now = time.time()
    os.utime(self.sysplug.child('plugindummy_builtin.py').path, (((now - 5000),) * 2))
    os.utime(self.syscache.path, (((now - 2000),) * 2))
    self.lockSystem()
    self.resetEnvironment()
