~laney/autopilot/legacy-psutil-children

« back to all changes in this revision

Viewing changes to autopilot/tests/functional/test_input_stack.py

  • Committer: Thomi Richards
  • Date: 2014-04-10 20:41:43 UTC
  • mfrom: (479 autopilot)
  • mto: This revision was merged to the branch mainline in revision 480.
  • Revision ID: thomi.richards@canonical.com-20140410204143-5a7znkjdjcoc7gxj
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from testtools import TestCase, skipIf
25
25
from testtools.matchers import IsInstance, Equals, raises
26
26
from textwrap import dedent
 
27
from time import sleep
27
28
from unittest import SkipTest
28
29
from mock import patch
29
30
 
103
104
 
104
105
        # make sure the text edit has keyboard focus:
105
106
        self.mouse.click_object(text_edit)
 
107
        self.assertThat(text_edit.focus, Eventually(Equals(True)))
 
108
 
 
109
        # even though we ensured the textedit has focus, it occasionally
 
110
        # does not yet accept keyboard input, causing this test to fail
 
111
        # intermittently.  to remedy this, we just add a sleep.
 
112
        sleep(2)
106
113
 
107
114
        # create keyboard and type the text.
108
115
        keyboard = Keyboard.create(self.backend)