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
=== modified file 'lib/lp/codehosting/codeimport/tests/test_worker.py'
--- lib/lp/codehosting/codeimport/tests/test_worker.py 2010-04-12 01:16:16 +0000
+++ lib/lp/codehosting/codeimport/tests/test_worker.py 2010-04-28 21:17:33 +0000
@@ -42,30 +42,6 @@
42import pysvn42import pysvn
4343
4444
45class ForeignBranchPluginLayer(BaseLayer):
46 """Ensure only specific tests are run with foreign branch plugins loaded.
47 """
48
49 @classmethod
50 def setUp(cls):
51 pass
52
53 @classmethod
54 def tearDown(cls):
55 # Raise NotImplementedError to signal that this layer cannot be torn
56 # down. This means that the test runner will run subsequent tests in
57 # a different process.
58 raise NotImplementedError
59
60 @classmethod
61 def testSetUp(cls):
62 pass
63
64 @classmethod
65 def testTearDown(cls):
66 pass
67
68
69default_format = BzrDirFormat.get_default_format()45default_format = BzrDirFormat.get_default_format()
7046
7147
@@ -76,7 +52,7 @@
76 factories for some code import objects.52 factories for some code import objects.
77 """53 """
7854
79 layer = ForeignBranchPluginLayer55 layer = BaseLayer
8056
81 def setUp(self):57 def setUp(self):
82 TestCaseWithTransport.setUp(self)58 TestCaseWithTransport.setUp(self)
@@ -1002,6 +978,8 @@
1002 """978 """
1003 from bzrlib.plugins.git.shamap import mapdbs979 from bzrlib.plugins.git.shamap import mapdbs
1004 mapdbs().clear()980 mapdbs().clear()
981 from bzrlib.plugins.git import deregister
982 deregister()
1005 WorkerTest.tearDown(self)983 WorkerTest.tearDown(self)
1006984
1007 def makeImportWorker(self, source_details):985 def makeImportWorker(self, source_details):