Rev 32: Remove the equivalence table tests, since we don't use it anymore. in http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/internal_index

John Arbash Meinel john at arbash-meinel.com
Wed Mar 4 16:11:39 GMT 2009


At http://bazaar.launchpad.net/%7Ebzr/bzr-groupcompress/internal_index

------------------------------------------------------------
revno: 32
revision-id: john at arbash-meinel.com-20090304161119-wjb6l5idp2k9niwq
parent: john at arbash-meinel.com-20090304160155-66iy2jorb5h39n6d
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: internal_index
timestamp: Wed 2009-03-04 10:11:19 -0600
message:
  Remove the equivalence table tests, since we don't use it anymore.
-------------- next part --------------
=== modified file 'tests/__init__.py'
--- a/tests/__init__.py	2009-03-04 16:01:55 +0000
+++ b/tests/__init__.py	2009-03-04 16:11:19 +0000
@@ -22,7 +22,6 @@
 def load_tests(standard_tests, module, loader):
     test_modules = [
         'errors',
-        'equivalence_table',
         'groupcompress',
         '_groupcompress_pyx',
         ]

=== removed file 'tests/test_equivalence_table.py'
--- a/tests/test_equivalence_table.py	2008-07-24 14:59:42 +0000
+++ b/tests/test_equivalence_table.py	1970-01-01 00:00:00 +0000
@@ -1,89 +0,0 @@
-# Copyright (C) 2008 Canonical Limited.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as published
-# by the Free Software Foundation.
-#
-# 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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
-#
-
-from bzrlib import tests
-
-from bzrlib.plugins.groupcompress import equivalence_table
-from bzrlib.plugins.groupcompress.tests.test__groupcompress_c import (
-    CompiledGroupCompress
-    )
-
-
-class TestEquivalenceTable(tests.TestCase):
-
-    eq_class = equivalence_table.EquivalenceTable
-
-    def test_create(self):
-        eq = self.eq_class(['a', 'b'])
-
-    def test_matching_lines(self):
-        lines = ['a', 'b', 'c', 'b']
-        eq = self.eq_class(lines)
-        self.assertEqual(lines, eq.lines)
-        self.assertEqual({'a': [0], 'b': [1, 3], 'c': [2]},
-                         eq._get_matching_lines())
-
-    def test_set_right_lines(self):
-        eq = self.eq_class(['a', 'b', 'c', 'b'])
-        eq.set_right_lines(['f', 'b', 'b'])
-        self.assertEqual(None, eq.get_idx_matches(0))
-        self.assertEqual([1, 3], eq.get_idx_matches(1))
-        self.assertEqual([1, 3], eq.get_idx_matches(2))
-
-    def assertGetLeftMatches(self, expected_left, eq, right):
-        """Assert that we find the right matching lines."""
-        self.assertEqual(expected_left, eq.get_matches(right))
-
-    def test_get_matching(self):
-        eq = self.eq_class(['a', 'b', 'c', 'b'])
-        self.assertGetLeftMatches([1, 3], eq, 'b')
-        self.assertGetLeftMatches([2], eq, 'c')
-        self.assertGetLeftMatches(None, eq, 'd')
-        self.assertGetLeftMatches([2], eq, 'c')
-
-    def test_extend_lines(self):
-        eq = self.eq_class(['a', 'b', 'c', 'b'])
-        eq.extend_lines(['d', 'e', 'c'], [True, True, True])
-        self.assertEqual(['a', 'b', 'c', 'b', 'd', 'e', 'c'],
-                         eq.lines)
-        self.assertEqual({'a': [0], 'b': [1, 3],
-                          'c': [2, 6], 'd': [4],
-                          'e': [5]},
-                         eq._get_matching_lines())
-
-    def test_extend_lines_ignored(self):
-        eq = self.eq_class(['a', 'b', 'c', 'b'])
-        eq.extend_lines(['d', 'e', 'c'], [False, False, True])
-        self.assertEqual(['a', 'b', 'c', 'b', 'd', 'e', 'c'],
-                         eq.lines)
-        self.assertEqual({'a': [0], 'b': [1, 3],
-                          'c': [2, 6], 'd': None, 'e': None},
-                         eq._get_matching_lines())
-
-    def test_abusive(self):
-        eq = self.eq_class(['a']*1000)
-        self.assertEqual({'a': range(1000)}, eq._get_matching_lines())
-        self.assertGetLeftMatches(range(1000), eq, 'a')
-
-
-class TestCompiledEquivalenceTable(TestEquivalenceTable):
-
-    _tests_need_features = [CompiledGroupCompress]
-
-    def setUp(self):
-        super(TestCompiledEquivalenceTable, self).setUp()
-        from bzrlib.plugins.groupcompress import _groupcompress_c
-        self.eq_class = _groupcompress_c.EquivalenceTable



More information about the bazaar-commits mailing list