Bug 974465 - Replaced all asterisk imports in Marionette client with explicit imports; r=automatedtester
authorWilliam Angell <william.h.angell@gmail.com>
Mon, 28 Apr 2014 10:18:00 +0100
changeset 181376 0d3f2e53c30e40eb44bb1b8fa3e6de87b087ff6c
parent 181375 bed47c3ab0182b1fd1b3cfcb17359d52e43bde83
child 181377 5a7de0eb94fe1e24f4fc292020d6ac57672cbe58
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersautomatedtester
bugs974465
milestone32.0a1
Bug 974465 - Replaced all asterisk imports in Marionette client with explicit imports; r=automatedtester
testing/marionette/client/marionette/__init__.py
testing/marionette/client/marionette/marionette.py
testing/marionette/client/marionette/marionette_test.py
testing/marionette/client/marionette/runner/__init__.py
testing/marionette/client/marionette/runner/mixins/__init__.py
testing/marionette/client/marionette/tests/unit/test_single_finger.py
testing/marionette/client/marionette/tests/unit/test_single_finger_desktop.py
--- a/testing/marionette/client/marionette/__init__.py
+++ b/testing/marionette/client/marionette/__init__.py
@@ -1,14 +1,26 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-from gestures import *
+from gestures import smooth_scroll, pinch
 from by import By
 from marionette import Marionette, HTMLElement, Actions, MultiActions
 from marionette_test import MarionetteTestCase, MarionetteJSTestCase, CommonTestCase, expectedFailure, skip, SkipTest
 from emulator import Emulator
-from errors import *
-from runner import *
+from errors import (
+        ErrorCodes, MarionetteException, InstallGeckoError, TimeoutException, InvalidResponseException,
+        JavascriptException, NoSuchElementException, XPathLookupException, NoSuchWindowException,
+        StaleElementException, ScriptTimeoutException, ElementNotVisibleException,
+        NoSuchFrameException, InvalidElementStateException, NoAlertPresentException,
+        InvalidCookieDomainException, UnableToSetCookieException, InvalidSelectorException,
+        MoveTargetOutOfBoundsException, FrameSendNotInitializedError, FrameSendFailureError
+        )
+from runner import (
+        B2GTestCaseMixin, B2GTestResultMixin, BaseMarionetteOptions, BaseMarionetteTestRunner, EnduranceOptionsMixin,
+        EnduranceTestCaseMixin, HTMLReportingOptionsMixin, HTMLReportingTestResultMixin, HTMLReportingTestRunnerMixin,
+        Marionette, MarionetteTest, MarionetteTestResult, MarionetteTextTestRunner, MemoryEnduranceTestCaseMixin,
+        MozHttpd, OptionParser, TestManifest, TestResult, TestResultCollection
+        )
 from wait import Wait
 from date_time_value import DateTimeValue
 import decorators
--- a/testing/marionette/client/marionette/marionette.py
+++ b/testing/marionette/client/marionette/marionette.py
@@ -9,17 +9,24 @@ import socket
 import sys
 import time
 import traceback
 
 from application_cache import ApplicationCache
 from decorators import do_crash_check
 from emulator import Emulator
 from emulator_screen import EmulatorScreen
-from errors import *
+from errors import (
+        ErrorCodes, MarionetteException, InstallGeckoError, TimeoutException, InvalidResponseException,
+        JavascriptException, NoSuchElementException, XPathLookupException, NoSuchWindowException,
+        StaleElementException, ScriptTimeoutException, ElementNotVisibleException,
+        NoSuchFrameException, InvalidElementStateException, NoAlertPresentException,
+        InvalidCookieDomainException, UnableToSetCookieException, InvalidSelectorException,
+        MoveTargetOutOfBoundsException, FrameSendNotInitializedError, FrameSendFailureError
+        )
 from keys import Keys
 from marionette_transport import MarionetteTransport
 
 import geckoinstance
 
 class HTMLElement(object):
     """
     Represents a DOM Element.
--- a/testing/marionette/client/marionette/marionette_test.py
+++ b/testing/marionette/client/marionette/marionette_test.py
@@ -9,17 +9,24 @@ import functools
 import sys
 import socket
 import time
 import types
 import unittest
 import weakref
 import warnings
 
-from errors import *
+from errors import (
+        ErrorCodes, MarionetteException, InstallGeckoError, TimeoutException, InvalidResponseException, 
+        JavascriptException, NoSuchElementException, XPathLookupException, NoSuchWindowException,
+        StaleElementException, ScriptTimeoutException, ElementNotVisibleException,
+        NoSuchFrameException, InvalidElementStateException, NoAlertPresentException,
+        InvalidCookieDomainException, UnableToSetCookieException, InvalidSelectorException,
+        MoveTargetOutOfBoundsException, FrameSendNotInitializedError, FrameSendFailureError
+        )
 from marionette import Marionette
 
 class SkipTest(Exception):
     """
     Raise this exception in a test to skip it.
 
     Usually you can use TestResult.skip() or one of the skipping decorators
     instead of raising this directly.
--- a/testing/marionette/client/marionette/runner/__init__.py
+++ b/testing/marionette/client/marionette/runner/__init__.py
@@ -1,6 +1,14 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-from base import *
-from mixins import *
+from base import (
+        B2GTestResultMixin, BaseMarionetteOptions, BaseMarionetteTestRunner,
+        Marionette, MarionetteTest, MarionetteTestResult, MarionetteTextTestRunner,
+        MozHttpd, OptionParser, TestManifest, TestResult, TestResultCollection
+        )
+from mixins import (
+        B2GTestCaseMixin, B2GTestResultMixin, EnduranceOptionsMixin,
+        EnduranceTestCaseMixin, HTMLReportingOptionsMixin, HTMLReportingTestResultMixin,
+        HTMLReportingTestRunnerMixin, MemoryEnduranceTestCaseMixin
+        )
--- a/testing/marionette/client/marionette/runner/mixins/__init__.py
+++ b/testing/marionette/client/marionette/runner/mixins/__init__.py
@@ -1,7 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-from endurance import *
-from reporting import *
-from b2g import *
+from endurance import (
+        EnduranceOptionsMixin, EnduranceTestCaseMixin, MemoryEnduranceTestCaseMixin
+        )
+from reporting import (
+        HTMLReportingOptionsMixin, HTMLReportingTestResultMixin,
+        HTMLReportingTestRunnerMixin
+        )
+from b2g import B2GTestCaseMixin, B2GTestResultMixin
--- a/testing/marionette/client/marionette/tests/unit/test_single_finger.py
+++ b/testing/marionette/client/marionette/tests/unit/test_single_finger.py
@@ -4,17 +4,22 @@
 
 from marionette_test import MarionetteTestCase
 from marionette import Actions
 from marionette import MarionetteException
 #add this directory to the path
 import os
 import sys
 sys.path.append(os.path.dirname(__file__))
-from single_finger_functions import *
+from single_finger_functions import (
+        chain, chain_flick, context_menu, double_tap, long_press_action,
+        move_element, move_element_offset, press_release, single_tap, wait,
+        wait_with_value
+        )
+
 
 class testSingleFinger(MarionetteTestCase):
     def test_press_release(self):
         press_release(self.marionette, self.wait_for_condition, "button1-touchstart-touchend-mousemove-mousedown-mouseup-click")
 
     def test_move_element(self):
         move_element(self.marionette, self.wait_for_condition, "button1-touchstart", "button2-touchmove-touchend")
 
--- a/testing/marionette/client/marionette/tests/unit/test_single_finger_desktop.py
+++ b/testing/marionette/client/marionette/tests/unit/test_single_finger_desktop.py
@@ -1,16 +1,20 @@
 from marionette_test import MarionetteTestCase
 from marionette import Actions
 from marionette import MarionetteException
 #add this directory to the path
 import os
 import sys
 sys.path.append(os.path.dirname(__file__))
-from single_finger_functions import *
+from single_finger_functions import (
+        chain, chain_flick, context_menu, double_tap, long_press_action,
+        move_element, move_element_offset, press_release, single_tap, wait,
+        wait_with_value
+        )
 
 class testSingleFingerMouse(MarionetteTestCase):
     def setUp(self):
         super(MarionetteTestCase, self).setUp()
         # set context menu related preferences needed for some tests
         self.marionette.set_context("chrome")
         self.enabled = self.marionette.execute_script("""
 let prefs = Components.classes["@mozilla.org/preferences-service;1"]