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
=== modified file 'NEWS'
--- NEWS 2010-02-06 08:21:56 +0000
+++ NEWS 2010-02-06 13:45:23 +0000
@@ -12,6 +12,8 @@
12Bug fixes:12Bug fixes:
1313
14* Fix toolbar appearance on OS X.14* Fix toolbar appearance on OS X.
15* Handle absense of PyQt4 when running selftest.
16 (Alexander Belchenko, #488681)
1517
1618
171.0.0beta1 05-Feb-2010191.0.0beta1 05-Feb-2010
1820
=== modified file 'tests/__init__.py'
--- tests/__init__.py 2009-07-08 20:28:10 +0000
+++ tests/__init__.py 2010-02-06 13:45:23 +0000
@@ -21,6 +21,7 @@
21 TestCaseInTempDir,21 TestCaseInTempDir,
22 TestCaseWithTransport,22 TestCaseWithTransport,
23 )23 )
24from bzrlib import trace
2425
2526
26class TestCaseWithQt(TestCaseWithTransport):27class TestCaseWithQt(TestCaseWithTransport):
@@ -83,5 +84,13 @@
83 'test_test_suite',84 'test_test_suite',
84 'test_welcome',85 'test_welcome',
85 ]]86 ]]
86 suite.addTests(loader.loadTestsFromModuleNames(mod_names))87 for m in mod_names:
88 try:
89 suite.addTests(loader.loadTestsFromModuleName(m))
90 except ImportError, e:
91 if str(e).endswith('PyQt4'):
92 trace.note('Explorer: skip module %s '
93 'because PyQt4 is not installed' % m)
94 else:
95 raise
87 return suite96 return suite

Subscribers

People subscribed via source and target branches