Merge lp:~bialix/bzr-explorer/test into lp:bzr-explorer

Proposed by Alexander Belchenko
Status: Merged
Merged at revision: not available
Proposed branch: lp:~bialix/bzr-explorer/test
Merge into: lp:bzr-explorer
Diff against target: 39 lines (+12/-1)
2 files modified
NEWS (+2/-0)
tests/__init__.py (+10/-1)
To merge this branch: bzr merge lp:~bialix/bzr-explorer/test
Reviewer Review Type Date Requested Status
Ian Clatworthy Approve
Review via email: mp+18759@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

This branch fixes bug #488681 in the same manner as QBzr: we just catch ImportError in load_tests and simply emit warning about absent PyQt4 library.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Thank-you. Please merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-02-06 08:21:56 +0000
3+++ NEWS 2010-02-06 13:45:23 +0000
4@@ -12,6 +12,8 @@
5 Bug fixes:
6
7 * Fix toolbar appearance on OS X.
8+* Handle absense of PyQt4 when running selftest.
9+ (Alexander Belchenko, #488681)
10
11
12 1.0.0beta1 05-Feb-2010
13
14=== modified file 'tests/__init__.py'
15--- tests/__init__.py 2009-07-08 20:28:10 +0000
16+++ tests/__init__.py 2010-02-06 13:45:23 +0000
17@@ -21,6 +21,7 @@
18 TestCaseInTempDir,
19 TestCaseWithTransport,
20 )
21+from bzrlib import trace
22
23
24 class TestCaseWithQt(TestCaseWithTransport):
25@@ -83,5 +84,13 @@
26 'test_test_suite',
27 'test_welcome',
28 ]]
29- suite.addTests(loader.loadTestsFromModuleNames(mod_names))
30+ for m in mod_names:
31+ try:
32+ suite.addTests(loader.loadTestsFromModuleName(m))
33+ except ImportError, e:
34+ if str(e).endswith('PyQt4'):
35+ trace.note('Explorer: skip module %s '
36+ 'because PyQt4 is not installed' % m)
37+ else:
38+ raise
39 return suite

Subscribers

People subscribed via source and target branches