@@ -2262,7 +2262,7 @@ msgstr "运行与这个套件相关联的测试而不收集结果。 这允许
22622262msgid ""
22632263"Return the number of tests represented by this test object, including all "
22642264"individual tests and sub-suites."
2265- msgstr ""
2265+ msgstr "返回此测试对象所提供的测试数量,包括单独的测试和子套件。 "
22662266
22672267#: ../../library/unittest.rst:1676
22682268msgid ""
@@ -2275,27 +2275,38 @@ msgid ""
22752275"tests returned by this method unless the caller uses a subclass that "
22762276"overrides :meth:`TestSuite._removeTestAtIndex` to preserve test references."
22772277msgstr ""
2278+ "由 :class:`TestSuite` 分组的测试总是可以通过迭代来访问。 其子类可以通过重载 :meth:`__iter__` 来惰性地提供测试。 "
2279+ "请注意此方法可在单个套件上多次被调用(例如在计数测试或相等性比较时),为此在 :meth:`TestSuite.run` "
2280+ "之前重复迭代所返回的测试对于每次调用迭代都必须相同。 在 :meth:`TestSuite.run` "
2281+ "之后,调用方不应继续访问此方法所返回的测试,除非调用方使用重载了 :meth:`TestSuite._removeTestAtIndex` "
2282+ "的子类来保留对测试的引用。"
22782283
22792284#: ../../library/unittest.rst:1686
22802285msgid ""
22812286"In earlier versions the :class:`TestSuite` accessed tests directly rather "
22822287"than through iteration, so overriding :meth:`__iter__` wasn't sufficient for"
22832288" providing tests."
22842289msgstr ""
2290+ "在较早的版本中 :class:`TestSuite` 会直接访问测试而不是通过迭代,因此只重载 :meth:`__iter__` 并不足以提供所有测试。"
22852291
22862292#: ../../library/unittest.rst:1691
22872293msgid ""
22882294"In earlier versions the :class:`TestSuite` held references to each "
22892295":class:`TestCase` after :meth:`TestSuite.run`. Subclasses can restore that "
22902296"behavior by overriding :meth:`TestSuite._removeTestAtIndex`."
22912297msgstr ""
2298+ "在较早的版本中 :class:`TestSuite` 会在 :meth:`TestSuite.run` 之后保留对每个 "
2299+ ":class:`TestCase` 的引用。 其子类可以通过重载 :meth:`TestSuite._removeTestAtIndex` "
2300+ "来恢复此行为。"
22922301
22932302#: ../../library/unittest.rst:1696
22942303msgid ""
22952304"In the typical usage of a :class:`TestSuite` object, the :meth:`run` method "
22962305"is invoked by a :class:`TestRunner` rather than by the end-user test "
22972306"harness."
22982307msgstr ""
2308+ "在 :class:`TestSuite` 对象的典型应用中,:meth:`run` 方法是由 :class:`TestRunner` "
2309+ "发起调用而不是由最终用户测试来控制。"
22992310
23002311#: ../../library/unittest.rst:1701
23012312msgid "Loading and running tests"
0 commit comments