@@ -2404,6 +2404,11 @@ msgid ""
2404
2404
"module's :attr:`~module.__dict__`, if specified, or ``{}`` otherwise. If "
2405
2405
"*extraglobs* is not specified, then it defaults to ``{}``."
2406
2406
msgstr ""
2407
+ "每个 :class:`DocTest` 的全局变量是由 *globs* 和 *extraglobs* 合并组成的(在 *extraglobs* "
2408
+ "中的绑定会覆盖 *globs* 中的绑定)。 针对每个). A new shallow copy of the globals dictionary "
2409
+ "is created for each :class:`!DocTest` 将会新建一个全局字典的浅拷贝。 如果未指定 *globs*,则它默认为模块的"
2410
+ " :attr:`~module.__dict__`,如果指定了该属性,未指定该属性则为 ``{}``。 如果未指定 *extraglobs*,则它默认为"
2411
+ " ``{}``。"
2407
2412
2408
2413
#: ../../library/doctest.rst:1426
2409
2414
msgid "DocTestParser objects"
@@ -2431,6 +2436,8 @@ msgid ""
2431
2436
":class:`!DocTest` object. See the documentation for :class:`DocTest` for "
2432
2437
"more information."
2433
2438
msgstr ""
2439
+ "*globs*, *name*, *filename* 和 *lineno* 是新的 :class:`!DocTest` 对象的属性。 请参阅 "
2440
+ ":class:`DocTest` 的文档了解详情。"
2434
2441
2435
2442
#: ../../library/doctest.rst:1450
2436
2443
msgid ""
@@ -2449,6 +2456,8 @@ msgid ""
2449
2456
"the :class:`!Example`\\ s are 0-based. The optional argument *name* is a "
2450
2457
"name identifying this string, and is only used for error messages."
2451
2458
msgstr ""
2459
+ "将给定的字符串划分为样例和中间文本,并以 :class:`Example` 和字符串交替的列表形式返回。 :class:`!Example` 的行号是从"
2460
+ " 0 开始的。 可选参数 *name* 是标识该字符串的名称,它仅用于错误消息。"
2452
2461
2453
2462
#: ../../library/doctest.rst:1464
2454
2463
msgid "TestResults objects"
@@ -2485,6 +2494,9 @@ msgid ""
2485
2494
"customized by passing a subclass of :class:`!OutputChecker` to the "
2486
2495
"constructor."
2487
2496
msgstr ""
2497
+ "预期的输出和实际的输出之间的比较是由 :class:`OutputChecker` 来完成的。 这种比较可以通过一些选项旗标来自定义;请参阅 "
2498
+ ":ref:`doctest-options` 小节了解详情。 如果这些选项旗标不够用,那么也可以通过向构造器传入一个 "
2499
+ ":class:`!OutputChecker` 的子类来自定义比较操作。"
2488
2500
2489
2501
#: ../../library/doctest.rst:1501
2490
2502
msgid ""
0 commit comments