~canonical-platform-qa/autopilot/depends_for_gsettings

« back to all changes in this revision

Viewing changes to autopilot/testcase.py

Create keyboard in testcase the first time it's needed.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
162
162
        self._process_manager = None
163
163
        self._mouse = None
164
164
        self._display = None
165
 
        self._kb = Keyboard.create()
 
165
        self._kb = None
166
166
 
167
167
        # Work around for bug lp:1297592.
168
168
        _ensure_uinput_device_created()
185
185
 
186
186
    @property
187
187
    def keyboard(self):
 
188
        if self._kb is None:
 
189
            self._kb = Keyboard.create()
188
190
        return self._kb
189
191
 
190
192
    @property