@@ -750,11 +750,11 @@ msgstr ""
750750
751751#: ../../library/test.rst:610
752752msgid "If no arguments are specified, it defaults to::"
753- msgstr ""
753+ msgstr "如果未指定任何参数,则默认为:: "
754754
755755#: ../../library/test.rst:614
756756msgid "In this case all warnings are caught and no errors are raised."
757- msgstr ""
757+ msgstr "在此情况下所有警告都会被捕获而不会引发任何错误。 "
758758
759759#: ../../library/test.rst:616
760760msgid ""
@@ -767,38 +767,42 @@ msgid ""
767767"that would otherwise be expected on an object representing a warning will "
768768"return ``None``."
769769msgstr ""
770+ "在进入该上下文管理器时,将返回一个 :class:`WarningRecorder` 实例。 来自 "
771+ ":func:`~warnings.catch_warnings` 的下层警告列表可通过该记录器对象的 :attr:`warnings` 属性来访问。 "
772+ "作为一个便捷方式,该对象中代表最近的警告的属性也可通过该记录器对象来直接访问(参见以下示例)。 "
773+ "如果未引发任何警告,则在其他情况下预期代表一个警告的任何对象属性都将返回 ``None``。"
770774
771775#: ../../library/test.rst:625
772776msgid ""
773777"The recorder object also has a :meth:`reset` method, which clears the "
774778"warnings list."
775- msgstr ""
779+ msgstr "该记录器对象还有一个 :meth:`reset` 方法,该方法会清空警告列表。 "
776780
777781#: ../../library/test.rst:628
778782msgid "The context manager is designed to be used like this::"
779- msgstr ""
783+ msgstr "该上下文管理器被设计为像这样来使用:: "
780784
781785#: ../../library/test.rst:635
782786msgid ""
783787"In this case if either warning was not raised, or some other warning was "
784788"raised, :func:`check_warnings` would raise an error."
785- msgstr ""
789+ msgstr "在此情况下如果两个警告都未被引发,或是引发了其他的警告,则 :func:`check_warnings` 将会引发一个错误。 "
786790
787791#: ../../library/test.rst:638
788792msgid ""
789793"When a test needs to look more deeply into the warnings, rather than just "
790794"checking whether or not they occurred, code like this can be used::"
791- msgstr ""
795+ msgstr "当一个测试需要更深入地查看这些警告,而不是仅仅检查它们是否发生时,可以使用这样的代码:: "
792796
793797#: ../../library/test.rst:652
794798msgid ""
795799"Here all warnings will be caught, and the test code tests the captured "
796800"warnings directly."
797- msgstr ""
801+ msgstr "在这里所有的警告都将被捕获,而测试代码会直接测试被捕获的警告。 "
798802
799803#: ../../library/test.rst:655
800804msgid "New optional arguments *filters* and *quiet*."
801- msgstr ""
805+ msgstr "新增可选参数 *filters* 和 *quiet*。 "
802806
803807#: ../../library/test.rst:661
804808msgid ""
@@ -1594,7 +1598,7 @@ msgstr "尝试对单个已存储值 (*dv*) 与所提供的值 (*v*) 进行匹配
15941598msgid ""
15951599"Class used to record warnings for unit tests. See documentation of "
15961600":func:`check_warnings` above for more details."
1597- msgstr ""
1601+ msgstr "用于为单元测试记录警告的类。 请参阅以上 :func:`check_warnings` 的文档来了解详情。 "
15981602
15991603#: ../../library/test.rst:1404
16001604msgid "Run *test* and return the result."
0 commit comments