[Python-checkins] cpython (merge 3.5 -> 3.6): Issue 29274: Merge doc fixes from 3.5

martin.panter python-checkins at python.org
Wed Jan 18 07:30:10 EST 2017


https://hg.python.org/cpython/rev/145da99b3df2
changeset:   106212:145da99b3df2
branch:      3.6
parent:      106206:fd889884fe08
parent:      106211:f2fe00653d07
user:        Martin Panter <vadmium+py at gmail.com>
date:        Wed Jan 18 12:11:12 2017 +0000
summary:
  Issue 29274: Merge doc fixes from 3.5

files:
  Doc/library/unittest.rst         |  8 ++++----
  Lib/unittest/loader.py           |  8 ++++----
  Lib/unittest/test/test_loader.py |  8 ++++----
  3 files changed, 12 insertions(+), 12 deletions(-)


diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1465,7 +1465,7 @@
 
 .. class:: TestSuite(tests=())
 
-   This class represents an aggregation of individual tests cases and test suites.
+   This class represents an aggregation of individual test cases and test suites.
    The class presents the interface needed by the test runner to allow it to be run
    as any other test case.  Running a :class:`TestSuite` instance is the same as
    iterating over the suite, running each test individually.
@@ -1573,7 +1573,7 @@
 
    .. method:: loadTestsFromTestCase(testCaseClass)
 
-      Return a suite of all tests cases contained in the :class:`TestCase`\ -derived
+      Return a suite of all test cases contained in the :class:`TestCase`\ -derived
       :class:`testCaseClass`.
 
       A test case instance is created for each method named by
@@ -1585,7 +1585,7 @@
 
    .. method:: loadTestsFromModule(module, pattern=None)
 
-      Return a suite of all tests cases contained in the given module. This
+      Return a suite of all test cases contained in the given module. This
       method searches *module* for classes derived from :class:`TestCase` and
       creates an instance of the class for each test method defined for the
       class.
@@ -1615,7 +1615,7 @@
 
    .. method:: loadTestsFromName(name, module=None)
 
-      Return a suite of all tests cases given a string specifier.
+      Return a suite of all test cases given a string specifier.
 
       The specifier *name* is a "dotted name" that may resolve either to a
       module, a test case class, a test method within a test case class, a
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py
--- a/Lib/unittest/loader.py
+++ b/Lib/unittest/loader.py
@@ -81,7 +81,7 @@
         self._loading_packages = set()
 
     def loadTestsFromTestCase(self, testCaseClass):
-        """Return a suite of all tests cases contained in testCaseClass"""
+        """Return a suite of all test cases contained in testCaseClass"""
         if issubclass(testCaseClass, suite.TestSuite):
             raise TypeError("Test cases should not be derived from "
                             "TestSuite. Maybe you meant to derive from "
@@ -95,7 +95,7 @@
     # XXX After Python 3.5, remove backward compatibility hacks for
     # use_load_tests deprecation via *args and **kws.  See issue 16662.
     def loadTestsFromModule(self, module, *args, pattern=None, **kws):
-        """Return a suite of all tests cases contained in the given module"""
+        """Return a suite of all test cases contained in the given module"""
         # This method used to take an undocumented and unofficial
         # use_load_tests argument.  For backward compatibility, we still
         # accept the argument (which can also be the first position) but we
@@ -135,7 +135,7 @@
         return tests
 
     def loadTestsFromName(self, name, module=None):
-        """Return a suite of all tests cases given a string specifier.
+        """Return a suite of all test cases given a string specifier.
 
         The name may resolve either to a module, a test case class, a
         test method within a test case class, or a callable object which
@@ -213,7 +213,7 @@
             raise TypeError("don't know how to make test from: %s" % obj)
 
     def loadTestsFromNames(self, names, module=None):
-        """Return a suite of all tests cases found using the given sequence
+        """Return a suite of all test cases found using the given sequence
         of string specifiers. See 'loadTestsFromName()'.
         """
         suites = [self.loadTestsFromName(name, module) for name in names]
diff --git a/Lib/unittest/test/test_loader.py b/Lib/unittest/test/test_loader.py
--- a/Lib/unittest/test/test_loader.py
+++ b/Lib/unittest/test/test_loader.py
@@ -35,7 +35,7 @@
     ### Tests for TestLoader.loadTestsFromTestCase
     ################################################################
 
-    # "Return a suite of all tests cases contained in the TestCase-derived
+    # "Return a suite of all test cases contained in the TestCase-derived
     # class testCaseClass"
     def test_loadTestsFromTestCase(self):
         class Foo(unittest.TestCase):
@@ -48,7 +48,7 @@
         loader = unittest.TestLoader()
         self.assertEqual(loader.loadTestsFromTestCase(Foo), tests)
 
-    # "Return a suite of all tests cases contained in the TestCase-derived
+    # "Return a suite of all test cases contained in the TestCase-derived
     # class testCaseClass"
     #
     # Make sure it does the right thing even if no tests were found
@@ -61,7 +61,7 @@
         loader = unittest.TestLoader()
         self.assertEqual(loader.loadTestsFromTestCase(Foo), empty_suite)
 
-    # "Return a suite of all tests cases contained in the TestCase-derived
+    # "Return a suite of all test cases contained in the TestCase-derived
     # class testCaseClass"
     #
     # What happens if loadTestsFromTestCase() is given an object
@@ -82,7 +82,7 @@
         else:
             self.fail('Should raise TypeError')
 
-    # "Return a suite of all tests cases contained in the TestCase-derived
+    # "Return a suite of all test cases contained in the TestCase-derived
     # class testCaseClass"
     #
     # Make sure loadTestsFromTestCase() picks up the default test method

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list