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
=== modified file 'bzrlib/plugins/launchpad/test_lp_api.py'
--- bzrlib/plugins/launchpad/test_lp_api.py 2010-03-05 08:55:12 +0000
+++ bzrlib/plugins/launchpad/test_lp_api.py 2010-12-08 13:41:52 +0000
@@ -25,12 +25,17 @@
2525
2626
27launchpadlib_feature = ModuleAvailableFeature('launchpadlib')27launchpadlib_feature = ModuleAvailableFeature('launchpadlib')
28# launchpadlib internally requires lazr.uri for some use cases (needed by the
29# tests but not encountered in most plugin uses). This allows tests to be
30# skipped on platforms that provides lanchpadlib itself but fail to provide its
31# dependencies.
32lazr_uri_feature = ModuleAvailableFeature('lazr.uri')
2833
2934
30class TestDependencyManagement(TestCase):35class TestDependencyManagement(TestCase):
31 """Tests for managing the dependency on launchpadlib."""36 """Tests for managing the dependency on launchpadlib."""
3237
33 _test_needs_features = [launchpadlib_feature]38 _test_needs_features = [launchpadlib_feature, lazr_uri_feature]
3439
35 def setUp(self):40 def setUp(self):
36 TestCase.setUp(self)41 TestCase.setUp(self)
@@ -72,7 +77,7 @@
72class TestCacheDirectory(TestCase):77class TestCacheDirectory(TestCase):
73 """Tests for get_cache_directory."""78 """Tests for get_cache_directory."""
7479
75 _test_needs_features = [launchpadlib_feature]80 _test_needs_features = [launchpadlib_feature, lazr_uri_feature]
7681
77 def test_get_cache_directory(self):82 def test_get_cache_directory(self):
78 # get_cache_directory returns the path to a directory inside the83 # get_cache_directory returns the path to a directory inside the
7984
=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- doc/en/release-notes/bzr-2.3.txt 2010-12-07 16:27:49 +0000
+++ doc/en/release-notes/bzr-2.3.txt 2010-12-08 13:41:52 +0000
@@ -64,6 +64,9 @@
64* Catch exceptions related to bug #637821 during test cleanup to avoid64* Catch exceptions related to bug #637821 during test cleanup to avoid
65 spurious failures. (Vincent Ladeuil, #686008).65 spurious failures. (Vincent Ladeuil, #686008).
6666
67* Define a test feature for the ``lazr.uri`` ``launchpadlib`` dependency to
68 avoid spurious test failures. (Vincent Ladeuil, #687315)
69
67* ``TestDebuntuExpansions`` was escaping the test isolation by calling the70* ``TestDebuntuExpansions`` was escaping the test isolation by calling the
68 wrong base class ``setUp``. (Vincent Ladeuil, #684622)71 wrong base class ``setUp``. (Vincent Ladeuil, #684622)
6972