@@ -1916,6 +1916,7 @@ msgid ""
19161916"provided. The default implementation of this method returns the first line "
19171917"of the test method's docstring, if available, or ``None``."
19181918msgstr ""
1919+ "返回测试的描述,如果未提供描述则返回 ``None``。 此方法的默认实现将在可用的情况下返回测试方法的文档字符串的第一行,或者返回 ``None``。"
19191920
19201921#: ../../library/unittest.rst:1449
19211922msgid ""
@@ -1924,6 +1925,8 @@ msgid ""
19241925"unittest extensions and adding the test name was moved to the "
19251926":class:`TextTestResult` in Python 3.2."
19261927msgstr ""
1928+ "在 3.1 中已修改此方法将测试名称添加到简短描述中,即使存在文档字符串。 这导致了与单元测试扩展的兼容性问题因而在 Python 3.2 "
1929+ "中将添加测试名称操作改到 :class:`TextTestResult` 中。"
19271930
19281931#: ../../library/unittest.rst:1458
19291932msgid ""
@@ -1933,18 +1936,22 @@ msgid ""
19331936"any arguments and keyword arguments passed into :meth:`addCleanup` when they"
19341937" are added."
19351938msgstr ""
1939+ "在 :meth:`tearDown` 之后添加了一个要调用的函数来清理测试期间所使用的资源。 函数将按它们被添加的相反顺序被调用 "
1940+ "(:abbr:`LIFO (last-in, first-out)`)。 它们在调用时将附带它们被添加时传给 :meth:`addCleanup` "
1941+ "的任何参数和关键字参数。"
19361942
19371943#: ../../library/unittest.rst:1464
19381944msgid ""
19391945"If :meth:`setUp` fails, meaning that :meth:`tearDown` is not called, then "
19401946"any cleanup functions added will still be called."
1941- msgstr ""
1947+ msgstr "如果 :meth:`setUp` 失败,即意味着 :meth:`tearDown` 未被调用,则已添加的任何清理函数仍将被调用。 "
19421948
19431949#: ../../library/unittest.rst:1472
19441950msgid ""
19451951"This method is called unconditionally after :meth:`tearDown`, or after "
19461952":meth:`setUp` if :meth:`setUp` raises an exception."
19471953msgstr ""
1954+ "此方法会在 :meth:`tearDown` 之后,或者如果 :meth:`setUp` 引发了异常则会在 :meth:`setUp` 之后被调用。"
19481955
19491956#: ../../library/unittest.rst:1475
19501957msgid ""
0 commit comments