@@ -2305,7 +2305,7 @@ msgstr "运行与这个套件相关联的测试而不收集结果。 这允许
23052305msgid ""
23062306"Return the number of tests represented by this test object, including all "
23072307"individual tests and sub-suites."
2308- msgstr ""
2308+ msgstr "返回此测试对象所提供的测试数量,包括单独的测试和子套件。 "
23092309
23102310#: ../../library/unittest.rst:1699
23112311msgid ""
@@ -2318,27 +2318,38 @@ msgid ""
23182318"tests returned by this method unless the caller uses a subclass that "
23192319"overrides :meth:`TestSuite._removeTestAtIndex` to preserve test references."
23202320msgstr ""
2321+ "由 :class:`TestSuite` 分组的测试总是可以通过迭代来访问。 其子类可以通过重载 :meth:`__iter__` 来惰性地提供测试。 "
2322+ "请注意此方法可在单个套件上多次被调用(例如在计数测试或相等性比较时),为此在 :meth:`TestSuite.run` "
2323+ "之前重复迭代所返回的测试对于每次调用迭代都必须相同。 在 :meth:`TestSuite.run` "
2324+ "之后,调用方不应继续访问此方法所返回的测试,除非调用方使用重载了 :meth:`TestSuite._removeTestAtIndex` "
2325+ "的子类来保留对测试的引用。"
23212326
23222327#: ../../library/unittest.rst:1709
23232328msgid ""
23242329"In earlier versions the :class:`TestSuite` accessed tests directly rather "
23252330"than through iteration, so overriding :meth:`__iter__` wasn't sufficient for"
23262331" providing tests."
23272332msgstr ""
2333+ "在较早的版本中 :class:`TestSuite` 会直接访问测试而不是通过迭代,因此只重载 :meth:`__iter__` 并不足以提供所有测试。"
23282334
23292335#: ../../library/unittest.rst:1714
23302336msgid ""
23312337"In earlier versions the :class:`TestSuite` held references to each "
23322338":class:`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that "
23332339"behavior by overriding :meth:`TestSuite._removeTestAtIndex`."
23342340msgstr ""
2341+ "在较早的版本中 :class:`TestSuite` 会在 :meth:`TestSuite.run` 之后保留对每个 "
2342+ ":class:`TestCase` 的引用。 其子类可以通过重载 :meth:`TestSuite._removeTestAtIndex` "
2343+ "来恢复此行为。"
23352344
23362345#: ../../library/unittest.rst:1719
23372346msgid ""
23382347"In the typical usage of a :class:`TestSuite` object, the :meth:`run` method "
23392348"is invoked by a :class:`TestRunner` rather than by the end-user test "
23402349"harness."
23412350msgstr ""
2351+ "在 :class:`TestSuite` 对象的典型应用中,:meth:`run` 方法是由 :class:`TestRunner` "
2352+ "发起调用而不是由最终用户测试来控制。"
23422353
23432354#: ../../library/unittest.rst:1724
23442355msgid "Loading and running tests"
0 commit comments