def test_failsWithDifferentModule(self):
        """
        L{isOriginalLocation} returns False when the attribute refers to
        an object outside of the module where that object was defined.
        """
        originalSource = """\
        class ImportThisClass(object):
            pass
        importThisObject = ImportThisClass()
        importThisNestingObject = ImportThisClass()
        importThisNestingObject.nestedObject = ImportThisClass()
        """

        importingSource = """\
        from original import (ImportThisClass,
                              importThisObject,
                              importThisNestingObject)
        """

        self.makeModule(originalSource, self.pathDir, 'original.py')
        importingDict = self.makeModuleAsDict(importingSource,
                                              self.pathDir,
                                              'importing.py')
        self.assertFalse(
            self.isOriginalLocation(
                importingDict['importing.ImportThisClass']))
        self.assertFalse(
            self.isOriginalLocation(
                importingDict['importing.importThisObject']))

        nestingObject = importingDict['importing.importThisNestingObject']
        nestingObjectDict = self.attributesAsDict(nestingObject)
        nestedObject = nestingObjectDict[
            'importing.importThisNestingObject.nestedObject']

        self.assertFalse(self.isOriginalLocation(nestedObject))

        L{isOriginalLocation} returns False when the attribute refers to
        an object outside of the module where that object was defined.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_test/test_discover.py