Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 37f183d

Browse files
committed
Issue python#29274: tests cases → test cases
1 parent 83ec302 commit 37f183d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Doc/library/unittest.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ Grouping tests
14651465

14661466
.. class:: TestSuite(tests=())
14671467

1468-
This class represents an aggregation of individual tests cases and test suites.
1468+
This class represents an aggregation of individual test cases and test suites.
14691469
The class presents the interface needed by the test runner to allow it to be run
14701470
as any other test case. Running a :class:`TestSuite` instance is the same as
14711471
iterating over the suite, running each test individually.
@@ -1573,7 +1573,7 @@ Loading and running tests
15731573

15741574
.. method:: loadTestsFromTestCase(testCaseClass)
15751575

1576-
Return a suite of all tests cases contained in the :class:`TestCase`\ -derived
1576+
Return a suite of all test cases contained in the :class:`TestCase`\ -derived
15771577
:class:`testCaseClass`.
15781578

15791579
A test case instance is created for each method named by
@@ -1585,7 +1585,7 @@ Loading and running tests
15851585

15861586
.. method:: loadTestsFromModule(module, pattern=None)
15871587

1588-
Return a suite of all tests cases contained in the given module. This
1588+
Return a suite of all test cases contained in the given module. This
15891589
method searches *module* for classes derived from :class:`TestCase` and
15901590
creates an instance of the class for each test method defined for the
15911591
class.
@@ -1615,7 +1615,7 @@ Loading and running tests
16151615

16161616
.. method:: loadTestsFromName(name, module=None)
16171617

1618-
Return a suite of all tests cases given a string specifier.
1618+
Return a suite of all test cases given a string specifier.
16191619

16201620
The specifier *name* is a "dotted name" that may resolve either to a
16211621
module, a test case class, a test method within a test case class, a

Lib/unittest/loader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __init__(self):
8181
self._loading_packages = set()
8282

8383
def loadTestsFromTestCase(self, testCaseClass):
84-
"""Return a suite of all tests cases contained in testCaseClass"""
84+
"""Return a suite of all test cases contained in testCaseClass"""
8585
if issubclass(testCaseClass, suite.TestSuite):
8686
raise TypeError("Test cases should not be derived from "
8787
"TestSuite. Maybe you meant to derive from "
@@ -95,7 +95,7 @@ def loadTestsFromTestCase(self, testCaseClass):
9595
# XXX After Python 3.5, remove backward compatibility hacks for
9696
# use_load_tests deprecation via *args and **kws. See issue 16662.
9797
def loadTestsFromModule(self, module, *args, pattern=None, **kws):
98-
"""Return a suite of all tests cases contained in the given module"""
98+
"""Return a suite of all test cases contained in the given module"""
9999
# This method used to take an undocumented and unofficial
100100
# use_load_tests argument. For backward compatibility, we still
101101
# accept the argument (which can also be the first position) but we
@@ -135,7 +135,7 @@ def loadTestsFromModule(self, module, *args, pattern=None, **kws):
135135
return tests
136136

137137
def loadTestsFromName(self, name, module=None):
138-
"""Return a suite of all tests cases given a string specifier.
138+
"""Return a suite of all test cases given a string specifier.
139139
140140
The name may resolve either to a module, a test case class, a
141141
test method within a test case class, or a callable object which
@@ -213,7 +213,7 @@ def loadTestsFromName(self, name, module=None):
213213
raise TypeError("don't know how to make test from: %s" % obj)
214214

215215
def loadTestsFromNames(self, names, module=None):
216-
"""Return a suite of all tests cases found using the given sequence
216+
"""Return a suite of all test cases found using the given sequence
217217
of string specifiers. See 'loadTestsFromName()'.
218218
"""
219219
suites = [self.loadTestsFromName(name, module) for name in names]

Lib/unittest/test/test_loader.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test___init__(self):
3535
### Tests for TestLoader.loadTestsFromTestCase
3636
################################################################
3737

38-
# "Return a suite of all tests cases contained in the TestCase-derived
38+
# "Return a suite of all test cases contained in the TestCase-derived
3939
# class testCaseClass"
4040
def test_loadTestsFromTestCase(self):
4141
class Foo(unittest.TestCase):
@@ -48,7 +48,7 @@ def foo_bar(self): pass
4848
loader = unittest.TestLoader()
4949
self.assertEqual(loader.loadTestsFromTestCase(Foo), tests)
5050

51-
# "Return a suite of all tests cases contained in the TestCase-derived
51+
# "Return a suite of all test cases contained in the TestCase-derived
5252
# class testCaseClass"
5353
#
5454
# Make sure it does the right thing even if no tests were found
@@ -61,7 +61,7 @@ def foo_bar(self): pass
6161
loader = unittest.TestLoader()
6262
self.assertEqual(loader.loadTestsFromTestCase(Foo), empty_suite)
6363

64-
# "Return a suite of all tests cases contained in the TestCase-derived
64+
# "Return a suite of all test cases contained in the TestCase-derived
6565
# class testCaseClass"
6666
#
6767
# What happens if loadTestsFromTestCase() is given an object
@@ -82,7 +82,7 @@ class NotATestCase(unittest.TestSuite):
8282
else:
8383
self.fail('Should raise TypeError')
8484

85-
# "Return a suite of all tests cases contained in the TestCase-derived
85+
# "Return a suite of all test cases contained in the TestCase-derived
8686
# class testCaseClass"
8787
#
8888
# Make sure loadTestsFromTestCase() picks up the default test method

0 commit comments

Comments
 (0)