Merge lp:~mwhudson/launchpad/unregister-bzr-git into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Work in progress
Proposed branch: lp:~mwhudson/launchpad/unregister-bzr-git
Merge into: lp:launchpad
Diff against target: 52 lines (+3/-25)
1 file modified
lib/lp/codehosting/codeimport/tests/test_worker.py (+3/-25)
To merge this branch: bzr merge lp:~mwhudson/launchpad/unregister-bzr-git
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+24279@code.launchpad.net

Commit message

Unregister bzr-git rather than using a layer that cannot be torn down

Description of the change

Hi,

A little while ago Rob hacked the bzr-git plugin to be deregisterable, so let's use that and avoid having to use a layer that can't be torn down to avoid bzr-git's being loaded causing other tests to fail.

Cheers,
mwh

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Looks like a positive change.

review: Approve
10392. By Michael Hudson-Doyle

merge devel

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Tests are failing in this, although I completely forget the details.

Unmerged revisions

10392. By Michael Hudson-Doyle

merge devel

10391. By Michael Hudson-Doyle

merge trunk

10390. By Michael Hudson-Doyle

deregister bzr-git in teardown

10389. By Michael Hudson-Doyle

use rob's branch

10388. By Michael Hudson-Doyle

revert ForeignBranchPluginLayer hack

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
2--- lib/lp/codehosting/codeimport/tests/test_worker.py 2010-04-12 01:16:16 +0000
3+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2010-04-28 21:17:33 +0000
4@@ -42,30 +42,6 @@
5 import pysvn
6
7
8-class ForeignBranchPluginLayer(BaseLayer):
9- """Ensure only specific tests are run with foreign branch plugins loaded.
10- """
11-
12- @classmethod
13- def setUp(cls):
14- pass
15-
16- @classmethod
17- def tearDown(cls):
18- # Raise NotImplementedError to signal that this layer cannot be torn
19- # down. This means that the test runner will run subsequent tests in
20- # a different process.
21- raise NotImplementedError
22-
23- @classmethod
24- def testSetUp(cls):
25- pass
26-
27- @classmethod
28- def testTearDown(cls):
29- pass
30-
31-
32 default_format = BzrDirFormat.get_default_format()
33
34
35@@ -76,7 +52,7 @@
36 factories for some code import objects.
37 """
38
39- layer = ForeignBranchPluginLayer
40+ layer = BaseLayer
41
42 def setUp(self):
43 TestCaseWithTransport.setUp(self)
44@@ -1002,6 +978,8 @@
45 """
46 from bzrlib.plugins.git.shamap import mapdbs
47 mapdbs().clear()
48+ from bzrlib.plugins.git import deregister
49+ deregister()
50 WorkerTest.tearDown(self)
51
52 def makeImportWorker(self, source_details):