Rev 2494: Add test for init-repository and merge. in file:///v/home/vila/src/experimental/reuse.transports/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri May 25 17:39:31 BST 2007
At file:///v/home/vila/src/experimental/reuse.transports/
------------------------------------------------------------
revno: 2494
revision-id: v.ladeuil+lp at free.fr-20070525163929-l6x2jv17ogc9q7s4
parent: v.ladeuil+lp at free.fr-20070525151818-xpagxvflu5j3yiq6
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: reuse.transports
timestamp: Fri 2007-05-25 18:39:29 +0200
message:
Add test for init-repository and merge.
* bzrlib/tests/commands/__init__.py:
(test_suite): Add test_init_repository and test_merge.
* bzrlib/tests/commands/test_merge.py:
New file.
* bzrlib/tests/commands/test_init_repository.py:
New file.
added:
bzrlib/tests/commands/test_init_repository.py test_init_repository-20070525163812-87xw0678ky573l27-1
bzrlib/tests/commands/test_merge.py test_merge.py-20070525163813-v8yfs5wu77hjsx0o-1
modified:
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/tests/commands/test_checkout.py test_checkout.py-20070525151718-vm7ligd5px5dtmda-1
-------------- next part --------------
=== added file 'bzrlib/tests/commands/test_init_repository.py'
--- a/bzrlib/tests/commands/test_init_repository.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/commands/test_init_repository.py 2007-05-25 16:39:29 +0000
@@ -0,0 +1,27 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+from bzrlib.builtins import cmd_init_repository
+from bzrlib.tests.TransportUtil import TestCaseWithConnectionHookedTransport
+
+class TestInitRepository(TestCaseWithConnectionHookedTransport):
+
+ def test_init_repository(self):
+ cmd = cmd_init_repository()
+ cmd.run(self.get_url())
+ self.assertEquals(1, len(self.connections))
+
=== added file 'bzrlib/tests/commands/test_merge.py'
--- a/bzrlib/tests/commands/test_merge.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/commands/test_merge.py 2007-05-25 16:39:29 +0000
@@ -0,0 +1,36 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+from bzrlib.builtins import cmd_merge
+from bzrlib.tests import StringIOWrapper
+from bzrlib.tests.TransportUtil import TestCaseWithConnectionHookedTransport
+
+class TestMerge(TestCaseWithConnectionHookedTransport):
+
+ def test_merge(self):
+ wt1 = self.make_branch_and_tree('branch1')
+ wt1.commit('empty commit')
+ wt2 = self.make_branch_and_tree('branch2')
+ wt2.pull(wt1.branch)
+ wt2.commit('empty commit too')
+
+ cmd = cmd_merge()
+ # We don't care about the ouput but 'outf' should be defined
+ cmd.outf = StringIOWrapper()
+ cmd.run(self.get_url() + '/branch1', directory='branch2')
+ self.assertEquals(1, len(self.connections))
+
=== modified file 'bzrlib/tests/commands/__init__.py'
--- a/bzrlib/tests/commands/__init__.py 2007-05-25 15:18:18 +0000
+++ b/bzrlib/tests/commands/__init__.py 2007-05-25 16:39:29 +0000
@@ -31,6 +31,8 @@
'bzrlib.tests.commands.test_branch',
'bzrlib.tests.commands.test_checkout',
'bzrlib.tests.commands.test_init',
+ 'bzrlib.tests.commands.test_init_repository',
+ 'bzrlib.tests.commands.test_merge',
'bzrlib.tests.commands.test_pull',
'bzrlib.tests.commands.test_push',
]
=== modified file 'bzrlib/tests/commands/test_checkout.py'
--- a/bzrlib/tests/commands/test_checkout.py 2007-05-25 15:18:18 +0000
+++ b/bzrlib/tests/commands/test_checkout.py 2007-05-25 16:39:29 +0000
@@ -16,7 +16,6 @@
from bzrlib.builtins import cmd_checkout
-from bzrlib.tests import StringIOWrapper
from bzrlib.tests.TransportUtil import TestCaseWithConnectionHookedTransport
class TestCheckout(TestCaseWithConnectionHookedTransport):
More information about the bazaar-commits
mailing list