[Merge] lp:~canonical-platform-qa/ubuntu-keyboard/fix_base_class into lp:ubuntu-keyboard
Leo Arias
leo.arias at canonical.com
Wed Apr 29 19:35:21 UTC 2015
Thanks max. Pushed.
Diff comments:
> === modified file 'tests/autopilot/ubuntu_keyboard/emulators/__init__.py'
> --- tests/autopilot/ubuntu_keyboard/emulators/__init__.py 2013-09-26 16:02:12 +0000
> +++ tests/autopilot/ubuntu_keyboard/emulators/__init__.py 2015-04-28 14:46:45 +0000
> @@ -1,7 +1,7 @@
> # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
> #
> # Ubuntu Keyboard Test Suite
> -# Copyright (C) 2013 Canonical
> +# Copyright (C) 2013, 2015 Canonical
> #
> # This program is free software: you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -16,9 +16,3 @@
> # You should have received a copy of the GNU General Public License
> # along with this program. If not, see <http://www.gnu.org/licenses/>.
> #
> -
> -from autopilot.introspection import CustomEmulatorBase
> -
> -
> -class UbuntuKeyboardEmulatorBase(CustomEmulatorBase):
> - """A base class for all Ubuntu Keyboard emulators."""
>
> === modified file 'tests/autopilot/ubuntu_keyboard/emulators/key.py'
> --- tests/autopilot/ubuntu_keyboard/emulators/key.py 2013-10-10 09:06:50 +0000
> +++ tests/autopilot/ubuntu_keyboard/emulators/key.py 2015-04-28 14:46:45 +0000
> @@ -1,7 +1,7 @@
> # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
> #
> # Ubuntu Keyboard Test Suite
> -# Copyright (C) 2013 Canonical
> +# Copyright (C) 2013, 2015 Canonical
> #
> # This program is free software: you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -17,15 +17,15 @@
> # along with this program. If not, see <http://www.gnu.org/licenses/>.
> #
>
> -from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
> -
> +import logging
> from collections import namedtuple
> -import logging
> +
> +import ubuntuuitoolkit
>
> logger = logging.getLogger(__name__)
>
>
> -class Key(UbuntuKeyboardEmulatorBase):
> +class Key(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
> """An emulator that encapsulates details of a keyboard key (i.e. extended
> characters).
>
>
> === modified file 'tests/autopilot/ubuntu_keyboard/emulators/keyboard.py'
> --- tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-03-12 17:34:47 +0000
> +++ tests/autopilot/ubuntu_keyboard/emulators/keyboard.py 2015-04-28 14:46:45 +0000
> @@ -1,7 +1,7 @@
> # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
> #
> # Ubuntu Keyboard Test Suite
> -# Copyright (C) 2013 Canonical
> +# Copyright (C) 2013, 2015 Canonical
> #
> # This program is free software: you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -19,13 +19,13 @@
>
> from collections import defaultdict
>
> -from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
> from ubuntu_keyboard.emulators.keypad import KeyPad
>
> from time import sleep
> import logging
> import os
>
> +import ubuntuuitoolkit as toolkit
Yes.
> from autopilot.input import Pointer, Touch
> from autopilot.introspection import (
> get_proxy_object_for_existing_process,
> @@ -114,7 +114,7 @@
> try:
> Keyboard.__maliit = get_proxy_object_for_existing_process(
> connection_name='org.maliit.server',
> - emulator_base=UbuntuKeyboardEmulatorBase
> + emulator_base=toolkit.UbuntuUIToolkitCustomProxyObjectBase
> )
>
> if Keyboard.__maliit is None:
> @@ -329,10 +329,10 @@
> if pointer is None:
> pointer = Pointer(Touch.create())
>
> - gu = float(os.environ.get('GRID_UNIT_PX', 8))
> + gu = float(os.environ.get('GRID_UNIT_PX', 8))
>
Yes, I'll move that ot another branch.
> pointer.drag(key_rect.x + key_rect.w / 2.0, key_rect.y + key_rect.h / 2.0,
> - key_rect.x + key_rect.w / 2.0 + offset, key_rect.y + key_rect.h / 2.0,
> + key_rect.x + key_rect.w / 2.0 + offset, key_rect.y + key_rect.h / 2.0,
> rate=2.77 * gu, time_between_events=2)
>
> def _keyboard_details_changed(self):
>
> === modified file 'tests/autopilot/ubuntu_keyboard/emulators/keypad.py'
> --- tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-03-09 13:07:56 +0000
> +++ tests/autopilot/ubuntu_keyboard/emulators/keypad.py 2015-04-28 14:46:45 +0000
> @@ -1,7 +1,7 @@
> # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
> #
> # Ubuntu Keyboard Test Suite
> -# Copyright (C) 2013 Canonical
> +# Copyright (C) 2013, 2015 Canonical
> #
> # This program is free software: you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> @@ -17,10 +17,12 @@
> # along with this program. If not, see <http://www.gnu.org/licenses/>.
> #
>
> -from ubuntu_keyboard.emulators import UbuntuKeyboardEmulatorBase
> +import logging
> +
> +import ubuntuuitoolkit
> +
> from ubuntu_keyboard.emulators.key import Key
>
> -import logging
>
> logger = logging.getLogger(__name__)
>
> @@ -31,7 +33,7 @@
> CAPSLOCK = "CAPSLOCK"
>
>
> -class KeyPad(UbuntuKeyboardEmulatorBase):
> +class KeyPad(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
> """A basic emulator that provides the details of the keys contained within.
>
> """
>
--
https://code.launchpad.net/~canonical-platform-qa/ubuntu-keyboard/fix_base_class/+merge/257644
Your team Ubuntu Phablet Team is requested to review the proposed merge of lp:~canonical-platform-qa/ubuntu-keyboard/fix_base_class into lp:ubuntu-keyboard.
More information about the Ubuntu-reviews
mailing list