class documentation

class OriginalLocationTests(_WritesPythonModules): (source)

View In Hierarchy

Tests that isOriginalLocation detects when a PythonAttribute's FQPN refers to an object inside the module where it was defined.

For example: A twisted.python.modules.PythonAttribute with a name of 'foo.bar' that refers to a 'bar' object defined in module 'baz' does *not* refer to bar's original location, while a PythonAttribute with a name of 'baz.bar' does.

Method setUp Undocumented
Method test_failsWithDifferentModule isOriginalLocation returns False when the attribute refers to an object outside of the module where that object was defined.
Method test_failsWithNoModule isOriginalLocation returns False when the attribute refers to an object whose source module cannot be determined.
Method test_succeedsWithSameModule isOriginalLocation returns True when the attribute refers to an object inside the module where that object was defined.
Instance Variable isOriginalLocation Undocumented

Inherited from _WritesPythonModules:

Method attributesAsDict Undocumented
Method loadModuleAsDict Undocumented
Method makeImportable Undocumented
Method makeModule Undocumented
Method makeModuleAsDict Undocumented
Method tearDown Undocumented
Method writeSourceInto Undocumented
Instance Variable FilePath Undocumented
Instance Variable getModule Undocumented
Instance Variable originalSysModules Undocumented
Instance Variable pathDir Undocumented
Instance Variable PythonPath Undocumented
Instance Variable savedSysPath Undocumented
def test_failsWithDifferentModule(self): (source)

isOriginalLocation returns False when the attribute refers to an object outside of the module where that object was defined.

def test_failsWithNoModule(self): (source)

isOriginalLocation returns False when the attribute refers to an object whose source module cannot be determined.

def test_succeedsWithSameModule(self): (source)

isOriginalLocation returns True when the attribute refers to an object inside the module where that object was defined.

isOriginalLocation = (source)

Undocumented