def test_yieldsMachineInNestedClassInModule(self):
        """
        When given a L{twisted.python.modules.PythonModule} that refers to
        the original module of a nested class containing a
        L{MethodicalMachine}, L{findMachinesViaWrapper} yields that
        machine and its FQPN.
        """
        source = """\
        from automat import MethodicalMachine

        class PythonClass(object):
            class NestedClass(object):
                _classMachine = MethodicalMachine()
        """
        module = self.makeModule(source, self.pathDir, 'nestedcls.py')
        PythonClass = self.loadModuleAsDict(
            module)['nestedcls.PythonClass'].load()

        self.assertIn(('nestedcls.PythonClass.NestedClass._classMachine',
                       PythonClass.NestedClass._classMachine),
                      list(self.findMachinesViaWrapper(module)))

        When given a L{twisted.python.modules.PythonModule} that refers to
        the original module of a nested class containing a
        L{MethodicalMachine}, L{findMachinesViaWrapper} yields that
        machine and its FQPN.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_test/test_discover.py