class documentation

A mixin for twisted.trial.unittest.SynchronousTestCase providing useful methods for manipulating Python's module system.

Method pathEntryWithOnePackage Generate a FilePath with one package, named pkgname, on it, and return the FilePath of the path entry.
Method replaceSysModules Replace sys.modules, for the duration of the test, with the given value.
Method replaceSysPath Replace sys.path, for the duration of the test, with the given value.
def pathEntryWithOnePackage(self, pkgname='test_package'): (source)

Generate a FilePath with one package, named pkgname, on it, and return the FilePath of the path entry.

Parameters
pkgname:strUndocumented
Returns
FilePathUndocumented
def replaceSysModules(self, sysModules): (source)

Replace sys.modules, for the duration of the test, with the given value.

Parameters
sysModules:Iterable[Tuple[str, ModuleType]]Undocumented
def replaceSysPath(self, sysPath): (source)

Replace sys.path, for the duration of the test, with the given value.

Parameters
sysPath:List[str]Undocumented