[Erp5-report] r34683 luke - /erp5/trunk/buildout/tests/assertSoftware.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Apr 20 14:24:02 CEST 2010


Author: luke
Date: Tue Apr 20 14:24:00 2010
New Revision: 34683

URL: http://svn.erp5.org?rev=34683&view=rev
Log:
 - add docstrings

Modified:
    erp5/trunk/buildout/tests/assertSoftware.py

Modified: erp5/trunk/buildout/tests/assertSoftware.py
URL: http://svn.erp5.org/erp5/trunk/buildout/tests/assertSoftware.py?rev=34683&r1=34682&r2=34683&view=diff
==============================================================================
--- erp5/trunk/buildout/tests/assertSoftware.py [utf8] (original)
+++ erp5/trunk/buildout/tests/assertSoftware.py [utf8] Tue Apr 20 14:24:00 2010
@@ -13,20 +13,14 @@
   return sorted([q.strip() for q in s.split() if len(q.strip()) > 0])
 
 class AssertPythonSoftware(unittest.TestCase):
-  """
-    TODO: Add doc string.
-  """
+  """Asserts that python related software is in good shape."""
 
   def test_python_version(self):
-   """
-    TODO: Add doc string.
-   """
-   self.assertEqual((2,4), sys.version_info[:2])
+    """Check built python version"""
+    self.assertEqual((2,4), sys.version_info[:2])
 
   def test_use_generated_python(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks generated python as python"""
     fd, name = tempfile.mkstemp()
     try:
       f = os.fdopen(fd, 'w')
@@ -45,17 +39,13 @@
       os.unlink(name)
 
   def test_use_generated_python_as_normal_interpreter(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks behabiour of generated python as interpreter"""
     stdout, stderr = subprocess.Popen(["bin/python2.4", "-V"],
         stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
     self.assertTrue('Python 2.4' in stderr)
 
   def test_required_libraries(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks possiblity of importing libraries"""
     required_library_list = createCleanList("""
       ERP5Diff
       MySQLdb
@@ -96,43 +86,31 @@
         'Python libraries not found:\n'+'\n'.join(failed_library_list))
 
 class AssertLddLibs(unittest.TestCase):
-  """
-    TODO: Add doc string.
-  """
+  """Checks for dynamic libraries"""
 
   def test_tritonn_senna(self):
-    """
-      TODO: Add doc string.
-    """
+    """Senna as an library"""
     result = os.system("ldd parts/mysql-tritonn-5.0/libexec/mysqld | grep -q "
         "'parts/senna/lib/libsenna.so.0'")
     self.assertEqual(result, 0)
 
   def test_MySQLdb(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks proper linking to mysql library from MySQLdb egg"""
     result = os.system("ldd develop-eggs/MySQL_python-1.2.3c1-py2.4-linux-x86"
        "_64.egg/_mysql.so | grep -q 'parts/mysql-tritonn-5.0/lib/mysql/libmys"
        "qlclient_r.so'")
     self.assertEqual(result, 0)
 
   def test_memcached_libevent(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks proper liunking to libevent from memcached"""
     result = os.system("ldd parts/memcached/bin/memcached | grep -q 'parts/li"
         "bevent/lib/libevent'")
 
 class AssertApache(unittest.TestCase):
-  """
-    TODO: Add doc string.
-  """
+  """Tests for built apache"""
 
   def test_modules(self):
-    """
-      TODO: Add doc string.
-    """
+    """Checks for availability of apache modules"""
     required_module_list = createCleanList("""
       authn_default_module
       log_config_module
@@ -211,6 +189,5 @@
     self.assertEqual([], failed_module_list,
         'Apache modules not found:\n'+'\n'.join(failed_module_list))
 
-    
 if __name__ == '__main__':
   unittest.main()




More information about the Erp5-report mailing list