@@ -1883,6 +1883,9 @@ msgid ""
1883
1883
"will be passed a :class:`DocTest` object. The *setUp* function can access "
1884
1884
"the test globals as the :attr:`~DocTest.globs` attribute of the test passed."
1885
1885
msgstr ""
1886
+ "可选参数 *setUp* 为测试套件指定一个设置函数。 此函数会在运行每个文件中的测试之前被调用。 *setUp* 函数将被传入一个 "
1887
+ ":class:`DocTest` 对象。 *setUp* 函数可以通过所传入测试的 :attr:`~DocTest.globs` "
1888
+ "属性来访问测试的全局变量。"
1886
1889
1887
1890
#: ../../library/doctest.rst:1083
1888
1891
msgid ""
@@ -1892,6 +1895,9 @@ msgid ""
1892
1895
" can access the test globals as the :attr:`~DocTest.globs` attribute of the "
1893
1896
"test passed."
1894
1897
msgstr ""
1898
+ "可选参数 *tearDown* 为测试套件指定一个拆卸函数。 此函数会在运行每个文件中的测试之后被调用。 *tearDown* 函数将被传入一个 "
1899
+ ":class:`DocTest` 对象。 *tearDown* 函数可以通过所传入测试的 :attr:`~DocTest.globs` "
1900
+ "属性来访问测试的全局变量。"
1895
1901
1896
1902
#: ../../library/doctest.rst:1089
1897
1903
msgid ""
@@ -1946,6 +1952,8 @@ msgid ""
1946
1952
"variables for the tests. A new copy of this dictionary is created for each "
1947
1953
"test. By default, *globs* is the module's :attr:`~module.__dict__`."
1948
1954
msgstr ""
1955
+ "可选参数 *globs* 是一个包含用于测试的初始全局变量的字典。 针对每个测试都将创建一个该字典的新副本。 在默认情况下,*globs* 就是模块的 "
1956
+ ":attr:`~module.__dict__`。"
1949
1957
1950
1958
#: ../../library/doctest.rst:1129
1951
1959
msgid ""
@@ -2193,6 +2201,8 @@ msgid ""
2193
2201
"``None`` if the filename is unknown, or if the :class:`!DocTest` was not "
2194
2202
"extracted from a file."
2195
2203
msgstr ""
2204
+ "该 :class:`DocTest` 所属文件的名称;或者如果文件名未知、或 :class:`!DocTest` 不是从文件中提取的则为 "
2205
+ "``None``。"
2196
2206
2197
2207
#: ../../library/doctest.rst:1283
2198
2208
msgid ""
0 commit comments