Rev 200: Abstracted config creation. in http://bzr.daniel-watkins.co.uk/pqm/abstract-patch
Daniel Watkins
daniel at daniel-watkins.co.uk
Sun Jul 20 15:51:42 BST 2008
At http://bzr.daniel-watkins.co.uk/pqm/abstract-patch
------------------------------------------------------------
revno: 200
revision-id: daniel at daniel-watkins.co.uk-20080720145015-keiwgsunyso3uxfn
parent: daniel at daniel-watkins.co.uk-20080720144232-7awjf34ecez4pnnl
committer: Daniel Watkins <daniel at daniel-watkins.co.uk>
branch nick: abstract-patch
timestamp: Sun 2008-07-20 15:50:15 +0100
message:
Abstracted config creation.
-------------- next part --------------
=== modified file 'pqm/tests/test_pqm.py'
--- a/pqm/tests/test_pqm.py 2008-07-20 14:42:32 +0000
+++ b/pqm/tests/test_pqm.py 2008-07-20 14:50:15 +0000
@@ -346,17 +346,21 @@
class TestPatchCommand(TestCaseWithQueue):
- def test_patch_command_empty_patch(self):
- tree = self.make_branch_and_tree('foo')
+ def get_config(self):
+ # Create branch to be patched
+ self.make_branch_and_tree('foo')
configp = ConfigParser()
configp.add_section('foo')
self.getQueue(empty=True)
- handler = pqm.BranchSpecOptionHandler(configp, queuedir='queue')
- script = MockScript()
-
+ # Create PQM working directory
self.build_tree(['bar/'])
pqm.workdir = 'bar'
+ return configp
+ def test_PatchCommand_empty_patch(self):
+ configp = self.get_config()
+ script = MockScript()
+ handler = pqm.BranchSpecOptionHandler(configp, queuedir='queue')
command = PatchCommand(script, handler, configp, [], 'foo')
e = self.assertRaises(PQMException, command.run)
self.assertEqual("'Empty patch content'", str(e))
More information about the bazaar-commits
mailing list