[csw-devel] SF.net SVN: gar:[17288] csw/mgar/gar/v2/lib/python

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Mar 4 13:30:27 CET 2012


Revision: 17288
          http://gar.svn.sourceforge.net/gar/?rev=17288&view=rev
Author:   wahwah
Date:     2012-03-04 12:30:27 +0000 (Sun, 04 Mar 2012)
Log Message:
-----------
pkgdb: Removing unit tests for removed code

WRT [17285]

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/package_checks_test.py
    csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py

Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2012-03-04 12:29:39 UTC (rev 17287)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py	2012-03-04 12:30:27 UTC (rev 17288)
@@ -1341,12 +1341,6 @@
 
 class TestCheckSharedLibraryNamingPolicy(CheckTestHelper, unittest.TestCase):
   FUNCTION_NAME = 'CheckSharedLibraryNamingPolicy'
-  def testNonUniformLibs(self):
-    self.pkg_data = neon_stats[0]
-    self.error_mgr_mock.ReportError(
-        'non-uniform-lib-versions-in-package',
-        "sonames=libneon.so.26,libneon.so.27")
-
   def testGood(self):
     self.pkg_data = bdb48_stats[0]
 

Modified: csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py	2012-03-04 12:29:39 UTC (rev 17287)
+++ csw/mgar/gar/v2/lib/python/sharedlib_utils_test.py	2012-03-04 12:30:27 UTC (rev 17288)
@@ -195,101 +195,6 @@
     self.assertEqual("libpython3_1_1_0", su.SonameToStringWithChar("libpython3.1.so.1.0", "_"))
 
 
-class GetCommonVersionUnitTest(unittest.TestCase):
-
-  def testGetCommonVersionSimple(self):
-    sonames = ["libfoo.so.0", "libfoo_util.so.0"]
-    self.assertEqual((True, "0"), su.GetCommonVersion(sonames))
-
-  def testGetCommonVersionMore(self):
-    sonames = ["libfoo.so.0.2.1", "libfoo_util.so.0.2.1"]
-    self.assertEqual((True, "0.2.1"), su.GetCommonVersion(sonames))
-
-  def testGetCommonVersionInvalid(self):
-    sonames = ["libfoo.so.0.2.1", "libfoo_util.so.0.2.3"]
-    self.assertEqual((False, None), su.GetCommonVersion(sonames))
-
-  def testGetCommonVersionEndsWithSo(self):
-    sonames = ["libfoo1.so", "libfoo1.so"]
-    self.assertEqual((True, ""), su.GetCommonVersion(sonames))
-
-
-class MakePackageNameBySonameCollectionUnitTest(unittest.TestCase):
-
-  def testMakePackageNameBySonameCollectionTwo(self):
-    sonames = ["libfoo.so.0", "libfoo_util.so.0"]
-    expected = (
-        ["CSWlibfoo0"],
-        ["libfoo0"],
-    )
-    self.assertEqual(expected, su.MakePackageNameBySonameCollection(sonames))
-
-  def testMakePackageNameBySonameCollectionRepeated(self):
-    sonames = ["libfoo.so.0", "libfoo.so.0"]
-    expected = (
-        ["CSWlibfoo0"],
-        ["libfoo0"],
-    )
-    self.assertEqual(expected, su.MakePackageNameBySonameCollection(sonames))
-
-  def testMakePackageNameBySonameCollectionBdb(self):
-    sonames = ["libfoo.so.0", "libfoo_util.so.0"]
-    expected = (
-        ["CSWlibfoo0"],
-        ["libfoo0"],
-    )
-    self.assertEqual(expected, su.MakePackageNameBySonameCollection(sonames))
-
-  def testMakePackageNameBySonameCollectionNoCommonVersion(self):
-    sonames = ["libfoo.so.0", "libfoo_util.so.1"]
-    self.assertEqual(None, su.MakePackageNameBySonameCollection(sonames))
-
-  def testMakePackageNameBySonameCollectionMultipleSo(self):
-    sonames = ["libfoo1.so", "libfoo1.so"]
-    expected = (
-        ["CSWlibfoo1"],
-        ["libfoo1"],
-    )
-    self.assertEqual(expected, su.MakePackageNameBySonameCollection(sonames))
-
-  def testMakePackageNameBySonameCollectionMultipleSoGlib2(self):
-    sonames = [
-      "libgio-2.0.so.0",
-      "libglib-2.0.so.0",
-      "libgmodule-2.0.so.0",
-      "libgobject-2.0.so.0",
-      "libgthread-2.0.so.0",
-    ]
-    self.assertEqual(None, su.MakePackageNameBySonameCollection(sonames))
-
-
-class ValidateCollectionNameTest(unittest.TestCase):
-
-  def testLetters(self):
-    self.assertEqual(True, su.ValidateCollectionName("foo"))
-
-  def testOneLetter(self):
-    self.assertEqual(False, su.ValidateCollectionName("f"))
-
-  def testNoLetters(self):
-    self.assertEqual(False, su.ValidateCollectionName("-2.0"))
-
-
-class CommomSubstringTest(unittest.TestCase):
-
-  def testLongestCommonSubstring_1(self):
-    self.assertEqual(set(["foo"]), su.LongestCommonSubstring("foo", "foo"))
-
-  def testLongestCommonSubstring_2(self):
-    self.assertEqual(set([]), su.LongestCommonSubstring("foo", "bar"))
-
-  def testLongestCommonSubstring_3(self):
-    self.assertEqual(set(["bar"]), su.LongestCommonSubstring("barfoobar", "bar"))
-
-  def testLongestCommonSubstring_4(self):
-    self.assertEqual(set(['bcd', 'hij']), su.LongestCommonSubstring("abcdefghijk", "bcdhij"))
-
-
 class GetIsalistUnitTest(unittest.TestCase):
 
   def testGetIsalistSparc(self):

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list