Rev 2782: Remove duplicate tests. in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Tue Sep 25 06:28:49 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 2782
revision-id: robertc at robertcollins.net-20070925052839-rh5bzzgqx11xds65
parent: robertc at robertcollins.net-20070925043415-zz6qfjgtsosnnf9y
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Tue 2007-09-25 15:28:39 +1000
message:
Remove duplicate tests.
modified:
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
=== modified file 'bzrlib/tests/test_versionedfile.py'
--- a/bzrlib/tests/test_versionedfile.py 2007-09-21 06:24:46 +0000
+++ b/bzrlib/tests/test_versionedfile.py 2007-09-25 05:28:39 +0000
@@ -207,51 +207,6 @@
self.assertRaises(errors.RevisionNotPresent, vf.get_lines,
version + "2")
- def test_add_lines_nostoresha(self):
- """When nostore_sha is supplied using old content raises."""
- vf = self.get_file()
- empty_text = ('a', [])
- sample_text_nl = ('b', ["foo\n", "bar\n"])
- sample_text_no_nl = ('c', ["foo\n", "bar"])
- shas = []
- for version, lines in (empty_text, sample_text_nl, sample_text_no_nl):
- sha, _, _ = vf.add_lines(version, [], lines)
- shas.append(sha)
- # we now have a copy of all the lines in the vf.
- for sha, (version, lines) in zip(
- shas, (empty_text, sample_text_nl, sample_text_no_nl)):
- self.assertRaises(errors.ExistingContent,
- vf.add_lines, version + "2", [], lines,
- nostore_sha=sha)
- # and no new version should have been added.
- self.assertRaises(errors.RevisionNotPresent, vf.get_lines,
- version + "2")
-
- def test_add_lines_nostoresha(self):
- """When nostore_sha is supplied using old content raises."""
- vf = self.get_file()
- empty_text = ('a', [])
- sample_text_nl = ('b', ["foo\n", "bar\n"])
- sample_text_no_nl = ('c', ["foo\n", "bar"])
- shas = []
- for version, lines in (empty_text, sample_text_nl, sample_text_no_nl):
- sha, _, _ = vf.add_lines(version, [], lines)
- shas.append(sha)
- # we now have a copy of all the lines in the vf.
- # is the test applicable to this vf implementation?
- try:
- vf.add_lines_with_ghosts('d', [], [])
- except NotImplementedError:
- raise TestSkipped("add_lines_with_ghosts is optional")
- for sha, (version, lines) in zip(
- shas, (empty_text, sample_text_nl, sample_text_no_nl)):
- self.assertRaises(errors.ExistingContent,
- vf.add_lines_with_ghosts, version + "2", [], lines,
- nostore_sha=sha)
- # and no new version should have been added.
- self.assertRaises(errors.RevisionNotPresent, vf.get_lines,
- version + "2")
-
def test_add_lines_return_value(self):
# add_lines should return the sha1 and the text size.
vf = self.get_file()
More information about the bazaar-commits
mailing list