def test_yieldsMachineInNestedClass(self):
        """
        When given a L{twisted.python.modules.PythonAttribute} that refers
        to a nested class that contains a L{MethodicalMachine} as a
        class variable, L{findMachinesViaWrapper} yields that machine
        and its FQPN.
        """
        source = """\
        from automat import MethodicalMachine

        class PythonClass(object):
            class NestedClass(object):
                _classMachine = MethodicalMachine()
        """
        moduleDict = self.makeModuleAsDict(source,
                                           self.pathDir,
                                           'nestedcls.py')

        PythonClass = moduleDict['nestedcls.PythonClass']
        self.assertIn(('nestedcls.PythonClass.NestedClass._classMachine',
                       PythonClass.load().NestedClass._classMachine),
                      list(self.findMachinesViaWrapper(PythonClass)))

        When given a L{twisted.python.modules.PythonAttribute} that refers
        to a nested class that contains a L{MethodicalMachine} as a
        class variable, L{findMachinesViaWrapper} yields that machine
        and its FQPN.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_test/test_discover.py