test_call_helpers: fix Comments
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Fri, 21 Dec 2018 15:24:33 +0000 (16:24 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Thu, 7 Feb 2019 15:50:39 +0000 (16:50 +0100)
test/test_call_helpers.py

index 83924db..951b3ea 100644 (file)
 #
 # Copyright (c) 2016-2018 Intra2net AG <info@intra2net.com>
 
-""" call_helper_unittest.py: unit tests for call_helpers
-
-Should be run from python2 and python3!
-"""
+"""Unit tests for :py:mod:`pyi2ncommon.call_helpers`."""
 
 from __future__ import absolute_import
 
@@ -33,10 +30,10 @@ from src.type_helpers import is_unicode
 
 
 class CallHelperTester(unittest.TestCase):
+    """Tester for module :py:mod:`pyi2ncommon.call_helpers`."""
 
     def test_call_and_capture(self):
-        """ tests call_and_capture with command ls -a / """
-
+        """Test call_and_capture with command ls -a /."""
         cmd = ['ls', '-a', '/']
         return_code, out_data, err_data = call_helpers.call_and_capture(cmd)
         self.assertEqual(return_code, 0)
@@ -53,8 +50,7 @@ class CallHelperTester(unittest.TestCase):
                         "Output is not of type str!")
 
     def test_call_and_capture_bytes(self):
-        """ tests call_and_capture with command ls -a / """
-
+        """Test call_and_capture with command ls -a /."""
         cmd = ['ls', '-a', '/']
         return_code, out_data, err_data = \
             call_helpers.call_and_capture(cmd, universal_newlines=False)
@@ -71,8 +67,7 @@ class CallHelperTester(unittest.TestCase):
         self.assertFalse(is_unicode(out_data[0]), "Output is unicode!")
 
     def test_call_and_capture_err(self):
-        """ tests call_and_capture with command ls -a / """
-
+        """Test call_and_capture with invalid ls command."""
         cmd = ['ls', '-e']
         return_code, out_data, err_data = call_helpers.call_and_capture(cmd)
         self.assertEqual(return_code, 2)