@@ -1878,6 +1878,7 @@ msgid ""
18781878"provided. The default implementation of this method returns the first line "
18791879"of the test method's docstring, if available, or ``None``."
18801880msgstr ""
1881+ "返回测试的描述,如果未提供描述则返回 ``None``。 此方法的默认实现将在可用的情况下返回测试方法的文档字符串的第一行,或者返回 ``None``。"
18811882
18821883#: ../../library/unittest.rst:1428
18831884msgid ""
@@ -1886,6 +1887,8 @@ msgid ""
18861887"unittest extensions and adding the test name was moved to the "
18871888":class:`TextTestResult` in Python 3.2."
18881889msgstr ""
1890+ "在 3.1 中已修改此方法将测试名称添加到简短描述中,即使存在文档字符串。 这导致了与单元测试扩展的兼容性问题因而在 Python 3.2 "
1891+ "中将添加测试名称操作改到 :class:`TextTestResult` 中。"
18891892
18901893#: ../../library/unittest.rst:1437
18911894msgid ""
@@ -1895,18 +1898,22 @@ msgid ""
18951898"any arguments and keyword arguments passed into :meth:`addCleanup` when they"
18961899" are added."
18971900msgstr ""
1901+ "在 :meth:`tearDown` 之后添加了一个要调用的函数来清理测试期间所使用的资源。 函数将按它们被添加的相反顺序被调用 "
1902+ "(:abbr:`LIFO (last-in, first-out)`)。 它们在调用时将附带它们被添加时传给 :meth:`addCleanup` "
1903+ "的任何参数和关键字参数。"
18981904
18991905#: ../../library/unittest.rst:1443
19001906msgid ""
19011907"If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called, then "
19021908"any cleanup functions added will still be called."
1903- msgstr ""
1909+ msgstr "如果 :meth:`setUp` 失败,即意味着 :meth:`tearDown` 未被调用,则已添加的任何清理函数仍将被调用。 "
19041910
19051911#: ../../library/unittest.rst:1451
19061912msgid ""
19071913"This method is called unconditionally after :meth:`tearDown`, or after "
19081914":meth:`setUp` if :meth:`setUp` raises an exception."
19091915msgstr ""
1916+ "此方法会在 :meth:`tearDown` 之后,或者如果 :meth:`setUp` 引发了异常则会在 :meth:`setUp` 之后被调用。"
19101917
19111918#: ../../library/unittest.rst:1454
19121919msgid ""
0 commit comments