Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/tutorius/tests/overlaytests.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/sugar/tutorius/tests/overlaytests.py')
-rw-r--r--src/sugar/tutorius/tests/overlaytests.py36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/sugar/tutorius/tests/overlaytests.py b/src/sugar/tutorius/tests/overlaytests.py
index b5fd209..783377c 100644
--- a/src/sugar/tutorius/tests/overlaytests.py
+++ b/src/sugar/tutorius/tests/overlaytests.py
@@ -25,7 +25,7 @@ import unittest
import logging
import gtk, gobject
-from sugar.tutorius.actions import Action, BubbleMessage
+from sugar.tutorius.actions import Action
import sugar.tutorius.overlayer as overlayer
class CanvasDrawable(object):
@@ -77,21 +77,24 @@ class OverlayerTest(unittest.TestCase):
assert not lbl.no_expose, "wrong no_expose evaluation"
- widget = overlayer.TextBubble("testing msg!", tailpos=(10,-20))
- widget.exposition_count = 0
- # override draw method
- def counter(ctx, self=widget):
- self.exposition_count += 1
- self.real_exposer(ctx)
- widget.real_exposer = widget.draw_with_context
- widget.draw_with_context = counter
- # centering allows to test the blending with the label
- overlay.put(widget, 50, 50)
- widget.show()
- assert widget.no_expose, \
- "Overlay should overide exposition handling of widget"
- assert not lbl.no_expose, \
- "Non-overlayed cairo should expose as usual"
+ widg = gtk.Button('bo')
+ widg.show()
+ overlay.put(widg, 50,50)
+ #widget = overlayer.TextBubble("testing msg!", tailpos=(10,-20))
+ #widget.exposition_count = 0
+ ## override draw method
+ #def counter(ctx, self=widget):
+ # self.exposition_count += 1
+ # self.real_exposer(ctx)
+ #widget.real_exposer = widget.draw_with_context
+ #widget.draw_with_context = counter
+ ## centering allows to test the blending with the label
+ #overlay.put(widget, 50, 50)
+ #widget.show()
+ #assert widget.no_expose, \
+ # "Overlay should overide exposition handling of widget"
+ #assert not lbl.no_expose, \
+ # "Non-overlayed cairo should expose as usual"
# force widget realization
# the child is flagged to be redrawn, the overlay should redraw too.
@@ -108,6 +111,7 @@ class OverlayerTest(unittest.TestCase):
# wrong.
while gtk.events_pending():
gtk.main_iteration(block=False)
+ time.sleep(10)
assert widget.exposition_count>0, "overlay widget should expose"