summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2017-01-18 12:14:29 +0000
committerMartin Panter <vadmium+py@gmail.com>2017-01-18 12:14:29 +0000
commit7d81455cf3e1f8b16326b3946cd3254fc8f1269e (patch)
tree017a62a58c0e4cfddd330c9df0496eec1394f014
parent99e0779ad5893ee067d12d6873b12c834b975e07 (diff)
downloadcpython-7d81455cf3e1f8b16326b3946cd3254fc8f1269e.tar.gz
Issue #29274: tests cases ? test cases
-rw-r--r--Doc/library/unittest.rst8
-rw-r--r--Lib/unittest/loader.py8
-rw-r--r--Lib/unittest/test/test_loader.py8
3 files changed, 12 insertions, 12 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index b0eaae68a7..3c0b96ff66 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -1352,7 +1352,7 @@ Grouping tests
.. 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.
@@ -1437,13 +1437,13 @@ Loading and running tests
.. 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`.
.. method:: loadTestsFromModule(module)
- 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.
@@ -1466,7 +1466,7 @@ Loading and running tests
.. 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
index 9163a1a00d..3c161b5bd9 100644
--- a/Lib/unittest/loader.py
+++ b/Lib/unittest/loader.py
@@ -46,7 +46,7 @@ class TestLoader(object):
_top_level_dir = None
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 TestCase?")
@@ -57,7 +57,7 @@ class TestLoader(object):
return loaded_suite
def loadTestsFromModule(self, module, use_load_tests=True):
- """Return a suite of all tests cases contained in the given module"""
+ """Return a suite of all test cases contained in the given module"""
tests = []
for name in dir(module):
obj = getattr(module, name)
@@ -75,7 +75,7 @@ class TestLoader(object):
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
@@ -124,7 +124,7 @@ class TestLoader(object):
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
index 68e871c698..d46ddc8cfc 100644
--- a/Lib/unittest/test/test_loader.py
+++ b/Lib/unittest/test/test_loader.py
@@ -10,7 +10,7 @@ class Test_TestLoader(unittest.TestCase):
### 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):
@@ -23,7 +23,7 @@ class Test_TestLoader(unittest.TestCase):
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
@@ -36,7 +36,7 @@ class Test_TestLoader(unittest.TestCase):
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
@@ -57,7 +57,7 @@ class Test_TestLoader(unittest.TestCase):
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