def test_multipleMachines(self):
        """
        Two machines may co-exist happily on the same instance; they don't
        interfere with each other.
        """
        class MultiMach(object):
            a = MethodicalMachine()
            b = MethodicalMachine()

            @a.input()
            def inputA(self):
                "input A"
            @b.input()
            def inputB(self):
                "input B"
            @a.state(initial=True)
            def initialA(self):
                "initial A"
            @b.state(initial=True)
            def initialB(self):
                "initial B"
            @a.output()
            def outputA(self):
                return "A"
            @b.output()
            def outputB(self):
                return "B"
            initialA.upon(inputA, initialA, [outputA])
            initialB.upon(inputB, initialB, [outputB])

        mm = MultiMach()
        self.assertEqual(mm.inputA(), ["A"])
        self.assertEqual(mm.inputB(), ["B"])

        Two machines may co-exist happily on the same instance; they don't
        interfere with each other.
        
stackoverflow/venv/lib/python3.6/site-packages/automat/_test/test_methodical.py