@@ -2795,7 +2795,7 @@ msgstr ":attr:`~Mock.return_value`"
27952795
27962796#: ../../library/unittest.mock.rst:2794
27972797msgid "*wraps*"
2798- msgstr ""
2798+ msgstr "*wraps* "
27992799
28002800#: ../../library/unittest.mock.rst:2796
28012801msgid ""
@@ -2805,6 +2805,9 @@ msgid ""
28052805"precedence will return the value. Regardless of the order of which was set "
28062806"first, the order of precedence remains unchanged."
28072807msgstr ""
2808+ "如果三个均已设置,模拟对象将返回来自 :attr:`~Mock.side_effect` 的值,完全忽略 "
2809+ ":attr:`~Mock.return_value` 和被包装的对象。 如果设置任意两个,则具有更高优先级的那个将返回值。 "
2810+ "无论设置的顺序是哪个在前,优先级顺序将保持不变。"
28082811
28092812#: ../../library/unittest.mock.rst:2814
28102813msgid ""
@@ -2813,19 +2816,24 @@ msgid ""
28132816" between :attr:`~Mock.return_value` and the wrapped object, ignoring "
28142817":attr:`~Mock.side_effect`."
28152818msgstr ""
2819+ "由于 ``None`` 是 :attr:`~Mock.side_effect` 的默认值,如果你将其值重新赋为 ``None``,则优先级顺序将在 "
2820+ ":attr:`~Mock.return_value` 和被包装的对象之间进行检查,并忽略 :attr:`~Mock.side_effect`。"
28162821
28172822#: ../../library/unittest.mock.rst:2823
28182823msgid ""
28192824"If the value being returned by :attr:`~Mock.side_effect` is :data:`DEFAULT`,"
28202825" it is ignored and the order of precedence moves to the successor to obtain "
28212826"the value to return."
28222827msgstr ""
2828+ "如果 :attr:`~Mock.side_effect` 所返回的值为 "
2829+ ":data:`DEFAULT`,它将被忽略并且优先级顺序将移至后继者来获取要返回的值。"
28232830
28242831#: ../../library/unittest.mock.rst:2832
28252832msgid ""
28262833"When :class:`Mock` wraps an object, the default value of "
28272834":attr:`~Mock.return_value` will be :data:`DEFAULT`."
28282835msgstr ""
2836+ "当 :class:`Mock` 包装一个对象时,:attr:`~Mock.return_value` 的默认值将为 :data:`DEFAULT`。"
28292837
28302838#: ../../library/unittest.mock.rst:2841
28312839msgid ""
0 commit comments