class OriginalLocationTests(_WritesPythonModules): (source)
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 | set |
Undocumented |
Method | test_fails |
isOriginalLocation returns False when the attribute refers to an object outside of the module where that object was defined. |
Method | test_fails |
isOriginalLocation returns False when the attribute refers to an object whose source module cannot be determined. |
Method | test_succeeds |
isOriginalLocation returns True when the attribute refers to an object inside the module where that object was defined. |
Instance Variable | is |
Undocumented |
Inherited from _WritesPythonModules
:
Method | attributes |
Undocumented |
Method | load |
Undocumented |
Method | make |
Undocumented |
Method | make |
Undocumented |
Method | make |
Undocumented |
Method | tear |
Undocumented |
Method | write |
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable | get |
Undocumented |
Instance Variable | original |
Undocumented |
Instance Variable | path |
Undocumented |
Instance Variable |
|
Undocumented |
Instance Variable | saved |
Undocumented |
isOriginalLocation
returns False when the attribute refers to an object outside of the module where that object was defined.
isOriginalLocation
returns False when the attribute refers to an object whose source module cannot be determined.
isOriginalLocation
returns True when the attribute refers to an object inside the module where that object was defined.