Merge lp:~vila/bzr/687315-lazr-uri into lp:bzr

Proposed by Vincent Ladeuil
Status: Rejected
Rejected by: Vincent Ladeuil
Proposed branch: lp:~vila/bzr/687315-lazr-uri
Merge into: lp:bzr
Diff against target: 44 lines (+10/-2)
2 files modified
bzrlib/plugins/launchpad/test_lp_api.py (+7/-2)
doc/en/release-notes/bzr-2.3.txt (+3/-0)
To merge this branch: bzr merge lp:~vila/bzr/687315-lazr-uri
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+43079@code.launchpad.net

Commit message

Tests requiring lazr.uri should check for its presence

Description of the change

Some test from the launchpad plugins rightly check for the
launchpadlib presence or are skipped.

Some of them still fail if some launchpadlib dependencies are not
present, namely lazr.uri.

This fixes bug #687315 by adding a lazr.uri test feature and uses
it where appropriate.

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/8/2010 7:40 AM, Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr/687315-lazr-uri into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> #687315 some tests from the launchpad plugin requires lazr.uri
> https://bugs.launchpad.net/bugs/687315
>
>
> Some test from the launchpad plugins rightly check for the
> launchpadlib presence or are skipped.
>
> Some of them still fail if some launchpadlib dependencies are not
> present, namely lazr.uri.
>
> This fixes bug #687315 by adding a lazr.uri test feature and uses
> it where appropriate.

 merge: approve

I would have thought you couldn't install launchpadlib without its
dependencies, but no big deal.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkz/u88ACgkQJdeBCYSNAANG7ACff2Bk8YHeFBpuh1Aj4F0xZSHb
qP4AoJAPN8ZDAAnnizcVPiBFs6Hs1d7o
=3Dwj
-----END PGP SIGNATURE-----

review: Approve
Revision history for this message
Vincent Ladeuil (vila) wrote :

> I would have thought you couldn't install launchpadlib without its
> dependencies, but no big deal.

Indeed. The babune setup includes a system-wide installed bzr *and* libraries installed as a side-effect. They are incomplete and led me to think that launchpadlib could be made to work without some dependencies which is wrong.

I've re-targeted bug #687315 to the bzr-mac-installers project instead.

Unmerged revisions

5564. By Vincent Ladeuil

Tests requiring lazr.uri should check for its presence

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/plugins/launchpad/test_lp_api.py'
2--- bzrlib/plugins/launchpad/test_lp_api.py 2010-03-05 08:55:12 +0000
3+++ bzrlib/plugins/launchpad/test_lp_api.py 2010-12-08 13:41:52 +0000
4@@ -25,12 +25,17 @@
5
6
7 launchpadlib_feature = ModuleAvailableFeature('launchpadlib')
8+# launchpadlib internally requires lazr.uri for some use cases (needed by the
9+# tests but not encountered in most plugin uses). This allows tests to be
10+# skipped on platforms that provides lanchpadlib itself but fail to provide its
11+# dependencies.
12+lazr_uri_feature = ModuleAvailableFeature('lazr.uri')
13
14
15 class TestDependencyManagement(TestCase):
16 """Tests for managing the dependency on launchpadlib."""
17
18- _test_needs_features = [launchpadlib_feature]
19+ _test_needs_features = [launchpadlib_feature, lazr_uri_feature]
20
21 def setUp(self):
22 TestCase.setUp(self)
23@@ -72,7 +77,7 @@
24 class TestCacheDirectory(TestCase):
25 """Tests for get_cache_directory."""
26
27- _test_needs_features = [launchpadlib_feature]
28+ _test_needs_features = [launchpadlib_feature, lazr_uri_feature]
29
30 def test_get_cache_directory(self):
31 # get_cache_directory returns the path to a directory inside the
32
33=== modified file 'doc/en/release-notes/bzr-2.3.txt'
34--- doc/en/release-notes/bzr-2.3.txt 2010-12-07 16:27:49 +0000
35+++ doc/en/release-notes/bzr-2.3.txt 2010-12-08 13:41:52 +0000
36@@ -64,6 +64,9 @@
37 * Catch exceptions related to bug #637821 during test cleanup to avoid
38 spurious failures. (Vincent Ladeuil, #686008).
39
40+* Define a test feature for the ``lazr.uri`` ``launchpadlib`` dependency to
41+ avoid spurious test failures. (Vincent Ladeuil, #687315)
42+
43 * ``TestDebuntuExpansions`` was escaping the test isolation by calling the
44 wrong base class ``setUp``. (Vincent Ladeuil, #684622)
45