File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
- {"translation" : " 81.77%" , "updated_at" : " 2025-06-09T23:55:42Z " }
1
+ {"translation" : " 81.77%" , "updated_at" : " 2025-06-10T13:57:15Z " }
Original file line number Diff line number Diff line change @@ -2028,6 +2028,11 @@ msgid ""
2028
2028
"way to pass options through :mod:`!unittest` to :mod:`!doctest` test "
2029
2029
"runners."
2030
2030
msgstr ""
2031
+ "因此这两种创建 :class:`unittest.TestSuite` 的方式都会运行 :class:`!DocTestCase` 的实例。 "
2032
+ "出于一个微妙的理由这是很重要的:当你自己运行 :mod:`doctest` 的函数时,你可以直接控制使用中的 :mod:`!doctest` "
2033
+ "选项,具体是通过传递选项旗标给 :mod:`!doctest` 的函数。 然而,如果你在编写一个 :mod:`unittest` 框架,则最终要由 "
2034
+ ":mod:`!unittest` 来控制测试的运行时间和方式。 框架作者通常希望控制 :mod:`!doctest` "
2035
+ "的报告选项(例如,可能由命令行选项指定),但没有办法通过 :mod:`!unittest` 向 :mod:`!doctest` 测试的运行方传递选项。"
2031
2036
2032
2037
#: ../../library/doctest.rst:1164
2033
2038
msgid ""
@@ -2063,6 +2068,12 @@ msgid ""
2063
2068
"instance was constructed, :mod:`!doctest`'s :mod:`!unittest` reporting flags"
2064
2069
" are ignored."
2065
2070
msgstr ""
2071
+ "这是模块全局的设置,并会影响 :mod:`unittest` 模块未来运行的所有文档测试: :class:`!DocTestCase` 的 "
2072
+ ":meth:`!runTest` 方法会查看 :class:`!DocTestCase` 实例构建时为测试用例指定的选项旗标。 "
2073
+ "如果没有指定报告旗标(这是典型且符合预期的情况),则 :mod:`!doctest` 的 :mod:`!unittest` 报告旗标将与选项旗标进行 "
2074
+ ":ref:`按位或运算 <bitwise>`,经过增强的选项旗标将被传递给为运行文档测试而创建的 :class:`DocTestRunner` 实例。 "
2075
+ "如果在构造 :class:`!DocTestCase` 实例时指定了任何报告旗标,则 :mod:`!doctest` 的 "
2076
+ ":mod:`!unittest` 报告旗标将被忽略。"
2066
2077
2067
2078
#: ../../library/doctest.rst:1186
2068
2079
msgid ""
You can’t perform that action at this time.
0 commit comments