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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Mon Mar 1 15:44:14 CET 2010


Revision: 8920
          http://gar.svn.sourceforge.net/gar/?rev=8920&view=rev
Author:   wahwah
Date:     2010-03-01 14:44:14 +0000 (Mon, 01 Mar 2010)

Log Message:
-----------
mGAR v2: checkpkg, fixed CheckDescription.

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

Modified: csw/mgar/gar/v2/lib/python/package_checks.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks.py	2010-03-01 14:34:08 UTC (rev 8919)
+++ csw/mgar/gar/v2/lib/python/package_checks.py	2010-03-01 14:44:14 UTC (rev 8920)
@@ -23,6 +23,7 @@
     "CSWiconv": ["/opt/csw/lib/charset.alias"],
     "CSWtexinfp": ["/opt/csw/share/info/dir"],
 }
+MAX_DESCRIPTION_LENGTH = 100
 
 
 def CheckForbiddenPaths(pkg_data, error_mgr, logger):

Modified: csw/mgar/gar/v2/lib/python/package_checks_old.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_old.py	2010-03-01 14:34:08 UTC (rev 8919)
+++ csw/mgar/gar/v2/lib/python/package_checks_old.py	2010-03-01 14:44:14 UTC (rev 8920)
@@ -9,7 +9,6 @@
 
 MAX_CATALOGNAME_LENGTH = 20
 MAX_PKGNAME_LENGTH = 20
-MAX_DESCRIPTION_LENGTH = 100
 ARCH_LIST = ["sparc", "i386", "all"]
 VERSION_RE = r".*,REV=(20[01][0-9]\.[0-9][0-9]\.[0-9][0-9]).*"
 ONLY_ALLOWED_IN_PKG = {

Modified: csw/mgar/gar/v2/lib/python/package_checks_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/package_checks_test.py	2010-03-01 14:34:08 UTC (rev 8919)
+++ csw/mgar/gar/v2/lib/python/package_checks_test.py	2010-03-01 14:44:14 UTC (rev 8920)
@@ -49,6 +49,13 @@
     self.error_mgr_mock.ReportError('pkginfo-description-missing')
 
 
+class TestDescriptionLong(CheckpkgUnitTestHelper, unittest.TestCase):
+  FUNCTION_NAME = 'CheckDescription'
+  def CheckpkgTest(self):
+    self.pkg_data["pkginfo"]["NAME"] = 'foo - ' 'A' * 200
+    self.error_mgr_mock.ReportError('pkginfo-description-too-long')
+
+
 class TestCheckCatalogname(CheckpkgUnitTestHelper, unittest.TestCase):
   FUNCTION_NAME = 'CheckCatalogname'
   def CheckpkgTest(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