diff options
author | Vincent Vinet <vince.vinet@gmail.com> | 2009-12-04 05:06:49 (GMT) |
---|---|---|
committer | Vincent Vinet <vince.vinet@gmail.com> | 2009-12-06 20:32:16 (GMT) |
commit | fb422aef7ee6832c85c8fa8a703e491838e74d62 (patch) | |
tree | 871950b00610cb90f212cc78a5bca0fa1825aef9 /tests/coretests.py | |
parent | 96e5675b0003d57cb87eb44f470aa2d309d8329b (diff) |
Add Event Sources:
- Add source property in Action and EventFilter
- Change TPropContainer contructor to accept keyword arguments and set
properties that were given
- Change every single TPropContainer subclass constructor to accept
kwargs and pass them on to super init
- Add a "null" option for TStringProperty
Use Event Sources:
- Make the probe require a source property to install or subscribe
- Have ProbeProxy install and subscribe return a prefixed address
- Make update, uninstall and unsubsribe extract the prefix from the
address
- Have the TutorialRunner set a source on actions/events before
installing/subscribing instead of setting current activity on
ProbeManager
Test Event Sources:
- Change the tests according to the new constructors and behaviors
Diffstat (limited to 'tests/coretests.py')
-rw-r--r-- | tests/coretests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/coretests.py b/tests/coretests.py index b9e04e5..1cc5431 100644 --- a/tests/coretests.py +++ b/tests/coretests.py @@ -242,7 +242,7 @@ class StateTest(unittest.TestCase): act1 = addon.create("BubbleMessage", message="Hi", position=[132,450]) act2 = addon.create("BubbleMessage", message="Hi", position=[132,450]) - event1 = addon.create("GtkWidgetEventFilter", "0.0.0.1.1.2.3.1", "clicked") + event1 = addon.create("GtkWidgetEventFilter", object_id="0.0.0.1.1.2.3.1", event_name="clicked") act3 = addon.create("DialogMessage", message="Hello again.", position=[200, 400]) @@ -276,19 +276,19 @@ class StateTest(unittest.TestCase): st2.name = "Identical" st3 = deepcopy(st1) - st3.add_action(addon.create("BubbleMessage", "Hi!", [128,264])) + st3.add_action(addon.create("BubbleMessage", message="Hi!", position=[128,264])) assert not (st1 == st3), "States having a different number of actions should be different" st4 = deepcopy(st1) - st4.add_event_filter(addon.create("GtkWidgetEventFilter", "0.0.1.1.2.2.3", "clicked"), "next_state") + st4.add_event_filter(addon.create("GtkWidgetEventFilter", object_id="0.0.1.1.2.2.3", event_name="clicked"), "next_state") assert not (st1 == st4), "States having a different number of events should be different" st5 = deepcopy(st1) st5._event_filters = [] - st5.add_event_filter(addon.create("GtkWidgetEventFilter", "0.1.2.3.4.1.2", "pressed"), "other_state") + st5.add_event_filter(addon.create("GtkWidgetEventFilter", object_id="0.1.2.3.4.1.2", event_name="pressed"), "other_state") assert not (st1 == st5), "States having the same number of event filters" \ + " but those being different should be different" @@ -502,7 +502,7 @@ class FSMTest(unittest.TestCase): st2 = State("Other State") st3 = State("Final State") - st1.add_action(addon.create("BubbleMessage", "Hi!", [132,312])) + st1.add_action(addon.create("BubbleMessage", message="Hi!", position=[132,312])) fsm.add_state(st1) fsm.add_state(st2) @@ -534,7 +534,7 @@ class FSMTest(unittest.TestCase): fsm3 = FiniteStateMachine("Identity test") - act3 = addon.create("BubbleMessage", "Hi!", [123,312]) + act3 = addon.create("BubbleMessage", message="Hi!", position=[123,312]) fsm3.add_action(act3) assert not(fsm3 == fsm), \ |