Code review comment for lp://qastaging/~gordallott/unity/fix-hud-lose-last-application-focus

Revision history for this message
Mirco Müller (macslow) wrote :

I cannot replicate the test-case Seb described in the bug-entry.

Running...

  unity/tools/autopilot run autopilot.tests.HudTests.test_restore_focus

... aborts with:
------------------------------------------------------------------

  Tests running...
  No handlers could be found for logger "autopilot.emulators.X11"
  ======================================================================
  FAIL: autopilot.tests.test_hud.HudTests.test_restore_focus
  ----------------------------------------------------------------------
  test-log: {{{
  17:31:45.413 DEBUG autopilot/emulators/unity/__init__.py:49 - Querying unity for state piece: '//HudController'
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:142 - Refreshing state for <autopilot.emulators.unity.hud.HudController object at 0x8beb5ac>
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:61 - Getting state for object HudController with id 17
  17:31:48.092 DEBUG autopilot/emulators/unity/__init__.py:49 - Querying unity for state piece: '//HudController[id=17]'
  }}}

  Traceback (most recent call last):
    File "autopilot/tests/test_hud.py", line 152, in test_restore_focus
      self.assertEqual(b.application_is_focused('Calculator'), True)
  MismatchError: False != True

  Ran 1 test in 2.767s
  FAILED (failures=1)
------------------------------------------------------------------

Running the command...

  python -m testtools.run autopilot.tests.test_hud.HudTests.test_restore_focus

... aborts with:
------------------------------------------------------------------
Xlib.protocol.request.QueryExtension
Traceback (most recent call last):
  File "./tools/autopilot", line 145, in <module>
    main()
  File "./tools/autopilot", line 139, in main
    run_tests(args)
  File "./tools/autopilot", line 106, in run_tests
    test_suite = loader.loadTestsFromNames(args.test)
  File "/usr/lib/python2.7/unittest/loader.py", line 128, in loadTestsFromNames
    suites = [self.loadTestsFromName(name, module) for name in names]
  File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
    parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'HudTests'
------------------------------------------------------------------

review: Needs Fixing

« Back to merge proposal