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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sat Jul 2 15:21:27 CEST 2011


Revision: 14963
          http://gar.svn.sourceforge.net/gar/?rev=14963&view=rev
Author:   wahwah
Date:     2011-07-02 13:21:27 +0000 (Sat, 02 Jul 2011)

Log Message:
-----------
checkpkg: An additional unit test

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

Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2011-07-02 10:35:56 UTC (rev 14962)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py	2011-07-02 13:21:27 UTC (rev 14963)
@@ -1113,7 +1113,22 @@
         'CSWfoo', 'file-collision', '/opt/csw/share/foo CSWbar CSWfoo')
     self.pkg_data = [self.CSWbar_DATA, self.CSWfoo_DATA]
 
+  def CheckpkgTest2(self):
+    # What if these two packages are not currently in the catalog?
+    self.error_mgr_mock.GetPkgByPath('/opt/csw/share/foo').AndReturn(
+        frozenset([]))
+    self.error_mgr_mock.GetPkgByPath('/opt/csw/share/foo').AndReturn(
+        frozenset([]))
+    self.error_mgr_mock.ReportError(
+        'CSWbar', 'file-collision', '/opt/csw/share/foo CSWbar CSWfoo')
+    self.error_mgr_mock.ReportError(
+        'CSWfoo', 'file-collision', '/opt/csw/share/foo CSWbar CSWfoo')
+    self.pkg_data = [self.CSWbar_DATA, self.CSWfoo_DATA]
 
+  def testTwo(self):
+    self.RunCheckpkgTest(self.CheckpkgTest2)
+
+
 class TestSetCheckSharedLibraryConsistencyIvtools(CheckpkgUnitTestHelper,
                                                   unittest.TestCase):
   """This tests for a case in which the SONAME that we're looking for doesn't


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