Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0e654e4

Browse files
[po] auto sync
1 parent 7e6f8f4 commit 0e654e4

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

library/unittest.mock.po

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,7 @@ msgstr ""
927927

928928
#: ../../library/unittest.mock.rst:1101
929929
msgid "Calling"
930-
msgstr ""
930+
msgstr "调用"
931931

932932
#: ../../library/unittest.mock.rst:1103
933933
msgid ""
@@ -937,25 +937,30 @@ msgid ""
937937
"explicitly or by calling the Mock) - but it is stored and the same one "
938938
"returned each time."
939939
msgstr ""
940+
"Mock 对象是可调用对象。 调用将把值集合作为 :attr:`~Mock.return_value` 属性返回。 默认的返回值是一个新的 Mock "
941+
"对象;它会在对返回值的首次访问(不论是显式访问还是通过调用 Mock)时被创建 —— 但它会被保存并且每次都返回相同的对象。"
940942

941943
#: ../../library/unittest.mock.rst:1109
942944
msgid ""
943945
"Calls made to the object will be recorded in the attributes like "
944946
":attr:`~Mock.call_args` and :attr:`~Mock.call_args_list`."
945947
msgstr ""
948+
"对该对象的调用将被记录在 :attr:`~Mock.call_args` 和 :attr:`~Mock.call_args_list` 等属性中。"
946949

947950
#: ../../library/unittest.mock.rst:1112
948951
msgid ""
949952
"If :attr:`~Mock.side_effect` is set then it will be called after the call "
950953
"has been recorded, so if :attr:`side_effect` raises an exception the call is"
951954
" still recorded."
952955
msgstr ""
956+
"如果设置了 :attr:`~Mock.side_effect` 则它将在调用被记录之后被调用,因此如果 :attr:`side_effect` "
957+
"引发了异常该调用仍然会被记录。"
953958

954959
#: ../../library/unittest.mock.rst:1116
955960
msgid ""
956961
"The simplest way to make a mock raise an exception when called is to make "
957962
":attr:`~Mock.side_effect` an exception class or instance:"
958-
msgstr ""
963+
msgstr "让一个 mock 在被调用时引发异常的最简单方式是将 :attr:`~Mock.side_effect` 设为一个异常类或实例:"
959964

960965
#: ../../library/unittest.mock.rst:1134
961966
msgid ""

0 commit comments

Comments
 (0)