-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a basic test harness to make sure Puppitor modules worked across Python 2 and 3 (as it is currently being developed in conjuction with Ren'Py which runs a sandboxed Python 2)
- Loading branch information
Showing
5 changed files
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import affecter | ||
import gesture_keys | ||
import animation_structure | ||
|
||
test_affecter = affecter.Gesture_Affecter('test_passions_rules.json','./affect_rules/') | ||
test_anim_struct = animation_structure.Animation_Structure(4) | ||
test_affect_vector = affecter.Affect_Vector(test_affecter.affect_rules.keys(), test_affecter.affect_rules) | ||
|
||
test_gesture_keys_obj = gesture_keys.Gesture_Interface() | ||
|
||
test_gesture_keys_obj.update_possible_states('open_flow', True) | ||
test_gesture_keys_obj.update_possible_states('tempo_up', True) | ||
test_gesture_keys_obj.update_possible_states('tempo_down', True) | ||
test_gesture_keys_obj.update_possible_states('closed_flow', True) | ||
test_gesture_keys_obj.update_possible_states('projected_energy', True) | ||
test_gesture_keys_obj.update_possible_states('pause', True) | ||
|
||
print(test_gesture_keys_obj.possible_action_states) | ||
print() | ||
|
||
test_gesture_keys_obj.update_actual_states('open_flow', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
test_gesture_keys_obj.update_actual_states('closed_flow', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
test_gesture_keys_obj.update_actual_states('projected_energy', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
test_gesture_keys_obj.update_actual_states('resting', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
test_gesture_keys_obj.update_actual_states('tempo_up', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
test_gesture_keys_obj.update_actual_states('tempo_down', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
test_gesture_keys_obj.update_actual_states('neutral', True) | ||
test_affecter.update_affect(test_affect_vector, test_gesture_keys_obj.current_states['actions'], test_gesture_keys_obj.current_states['modifiers']) | ||
print(test_gesture_keys_obj.actual_action_states) | ||
print() | ||
print(test_affect_vector.affects) | ||
print() | ||
|
||
print(test_affecter.get_possible_affects(test_affect_vector)) | ||
print(test_affecter.get_prevailing_affect(test_affect_vector)) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters