@@ -0,0 +1,1347 @@
+import unittest%0Afrom collections import OrderedDict%0Afrom typing import Optional%0A%0Afrom contextshell.ActionExecutor import Action, pack_argument_tree%0Afrom contextshell.NodePath import NodePath, NodePath as np%0Afrom contextshell.ActionExecutor import ActionExecutor%0Afrom tests.unit.Fakes import FakeAction%0A%0A%0Aclass TestableActionExecutor(ActionExecutor):%0A    found_action: Action = None%0A%0A    def find_action(self, target: NodePath, action: NodePath) -%3E Optional%5BAction%5D:%0A        return self.found_action%0A%0A%0Aclass ExecuteTests(unittest.TestCase):%0A    def test_no_action_found(self):%0A        executor = TestableActionExecutor()%0A%0A        with self.assertRaises(NameError):%0A            executor.execute(np(%22target%22), np(%22action%22))%0A%0A    def test_no_args_passes_empty_dict(self):%0A        executor = TestableActionExecutor()%0A        action = FakeAction()%0A        executor.found_action = action%0A%0A        executor.execute(np(%22target%22), action.name)%0A%0A        self.assertEqual(OrderedDict(), action.received_arguments)%0A%0A    def test_args_are_passed_to_action(self):%0A        executor = TestableActionExecutor()%0A        action = FakeAction()%0A        executor.found_action = action%0A        packed_args = pack_argument_tree('foo', 123)%0A%0A        executor.execute(np(%22target%22), action.name, packed_args)%0A%0A        self.assertEqual(packed_args, action.received_arguments)%0A

Add ActionExecutor tests