feature complete version, tests and debug pending

This commit is contained in:
David Gil de Gómez Pérez
2026-07-15 14:20:27 +03:00
parent 6e6c390c02
commit cc4c0c8047
3 changed files with 74 additions and 22 deletions
+12 -1
View File
@@ -7,4 +7,15 @@ class TestMachine(unittest.TestCase):
def test_init(self):
m = Machine()
self.assertIsNotNone(m)
self.assertIsNotNone(m)
def test_add_state_two_start_states(self):
m = Machine()
m.add_state("A", {}, True, False)
self.assertRaises(ValueError, m.add_state, "B", {}, True, False)
def test_add_two_end_states(self):
m = Machine()
m.add_state("A", {}, True, False)
m.add_state("B", {}, False, True)
m.add_state("C", {}, False, True)