Merge lp:~canonical-platform-qa/sudoku-app/autopilot-workaround_dialog into lp:sudoku-app

Proposed by Leo Arias on 2015-01-13
Status: Work in progress
Proposed branch: lp:~canonical-platform-qa/sudoku-app/autopilot-workaround_dialog
Merge into: lp:sudoku-app
Diff against target: 28 lines (+12/-1)
1 file modified
tests/autopilot/sudoku_app/__init__.py (+12/-1)
To merge this branch: bzr merge lp:~canonical-platform-qa/sudoku-app/autopilot-workaround_dialog
Reviewer Review Type Date Requested Status
Nicholas Skaggs 2015-01-13 Needs Fixing on 2015-05-19
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing on 2015-05-18
Review via email: mp+246255@code.launchpad.net

Commit Message

Workaround in autopilot tests for the new Dialog custom proxy object that makes more than one class match.

To post a comment you must log in.
Nicholas Skaggs (nskaggs) wrote :

timeout --kill-after=30 --signal=2 1200 python3 -m autopilot.run run --timeout-profile=long -v -o /tmp/test_sudoku_app.xml -f xml -r -rd /tmp/ sudoku_app
22:08:18.716 INFO run:228 - Autopilot Source Version: 1.5.0
Autopilot Package Version: 1.5.0+14.10.20140812-0ubuntu1
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 735, in <module>
    main()
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 729, in main
    test_app.run()
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 617, in run
    action()
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 655, in run_tests
    self.args.suite
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 463, in load_test_suite_from_name
    all_tests, error_occured = _discover_requested_tests(test_names)
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 395, in _discover_requested_tests
    test, top_level_dir = _discover_test(name)
  File "/usr/lib/python3/dist-packages/autopilot/run.py", line 373, in _discover_test
    top_level_dir=top_level_dir
  File "/usr/lib/python3.4/unittest/loader.py", line 213, in discover
    __import__(start_dir)
  File "/usr/lib/python3/dist-packages/sudoku_app/__init__.py", line 226, in <module>
    class Dialog(ubuntuuitoolkit.Dialog):
AttributeError: 'module' object has no attribute 'Dialog'

review: Needs Fixing

Unmerged revisions

336. By Leo Arias on 2015-01-13

Updated copyright year.

335. By Leo Arias on 2015-01-13

Workaround in autopilot tests for the new Dialog custom proxy object that makes more than one class match.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/autopilot/sudoku_app/__init__.py'
2--- tests/autopilot/sudoku_app/__init__.py 2014-10-06 19:30:23 +0000
3+++ tests/autopilot/sudoku_app/__init__.py 2015-01-13 06:52:39 +0000
4@@ -1,5 +1,5 @@
5 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
6-# Copyright 2013, 2014 Canonical
7+# Copyright 2013, 2014, 2015 Canonical
8 #
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License version 3, as published
11@@ -223,6 +223,17 @@
12 self.pointing_device.click_object(ok_button)
13
14
15+class Dialog(ubuntuuitoolkit.Dialog):
16+
17+ # XXX A new Dialog custom proxy object was added to the toolkit.
18+ # Because of https://bugs.launchpad.net/autopilot-qt/+bug/1341671
19+ # we need to make sure it does not match in any selection.
20+
21+ @classmethod
22+ def validate_dbus_object(cls, path, state):
23+ return False
24+
25+
26 class ProfileDialog(ubuntuuitoolkit.UbuntuUIToolkitCustomProxyObjectBase):
27
28 PROFILE_LIST_VIEW_OBJECT_NAME = None

Subscribers

People subscribed via source and target branches