def test_ordered_dict_action_structure_with_bad_ordering(self): reversed_spec = collections.OrderedDict([('a', self._ACTION_SPEC), ('b', self._ACTION_SPEC)]) expected_action = collections.OrderedDict([('b', self._ACTION), ('a', self._ACTION)]) with self.assertRaisesRegex( AssertionError, r"Lists differ: \['a', 'b'\] != \['b', 'a'\]"): self.assertNestedArraysEqual( expected_action, runtime._get_default_action(reversed_spec))
def test_action_spec_interval(self, action_spec, expected_action): self.assertNestedArraysEqual(expected_action, runtime._get_default_action(action_spec))