@@ -2450,7 +2450,7 @@ msgstr ""
24502450
24512451#: ../../library/unittest.rst:1795
24522452msgid "Return a suite of all test cases given a string specifier."
2453- msgstr ""
2453+ msgstr "返回由给出了字符串形式规格描述的所有测试用例组成的测试套件。 "
24542454
24552455#: ../../library/unittest.rst:1797
24562456msgid ""
@@ -2462,6 +2462,10 @@ msgid ""
24622462"will be picked up as \" a test method within a test case class\" , rather than"
24632463" \" a callable object\" ."
24642464msgstr ""
2465+ "描述名称 *name* 是一个“带点号的名称”,它可以被解析为一个模块、一个测试用例类、一个测试用例类内部的测试方法、一个 "
2466+ ":class:`TestSuite` 实例,或者一个返回 :class:`TestCase` 或 :class:`TestSuite` "
2467+ "实例的可调用对象。 "
2468+ "这些检查将按在此列出的顺序执行;也就是说,一个可能的测试用例类上的方法将作为“一个测试用例内部的测试方法”而非作为“一个可调用对象”被选定。"
24652469
24662470#: ../../library/unittest.rst:1805
24672471msgid ""
@@ -2475,6 +2479,11 @@ msgid ""
24752479"can refer to modules and packages which have not been imported; they will be"
24762480" imported as a side-effect."
24772481msgstr ""
2482+ "举例来说,如果你有一个模块 :mod:`SampleTests`,其中包含一个派生自 :class:`TestCase` 的类 "
2483+ ":class:`SampleTestCase`,其中包含三个测试方法 (:meth:`test_one`, :meth:`test_two` 和 "
2484+ ":meth:`test_three`)。 则描述名称 ``'SampleTests.SampleTestCase'`` "
2485+ "将使此方法返回一个测试套件,它将运行全部三个测试方法。 使用描述名称 ``'SampleTests.SampleTestCase.test_two'``"
2486+ " 将使它返回一个测试套件,它将仅运行 :meth:`test_two` 测试方法。 描述名称可以指向尚未被导入的模块和包;它们将作为附带影响被导入。"
24782487
24792488#: ../../library/unittest.rst:1815
24802489msgid "The method optionally resolves *name* relative to the given *module*."
0 commit comments