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

Skip to content

Commit b7501c0

Browse files
[po] auto sync
1 parent 976a296 commit b7501c0

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

library/unittest.mock.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -559,26 +559,28 @@ msgid ""
559559
" to be raised, or a value to be returned from the call to the mock "
560560
"(:data:`DEFAULT` handling is identical to the function case)."
561561
msgstr ""
562+
"如果你传入一个可迭代对象,它会被用来获取一个在每次调用时必须产生一个值的迭代器。 这个值可以是一个要被引发的异常实例,或是一个要从该调用返回给 mock"
563+
" 的值 (:data:`DEFAULT` 处理与函数的情况一致)。"
562564

563565
#: ../../library/unittest.mock.rst:560
564566
msgid ""
565567
"An example of a mock that raises an exception (to test exception handling of"
566568
" an API):"
567-
msgstr ""
569+
msgstr "一个引发异常(来测试 API 的异常处理)的 mock 的示例:"
568570

569571
#: ../../library/unittest.mock.rst:570
570572
msgid "Using :attr:`side_effect` to return a sequence of values:"
571-
msgstr ""
573+
msgstr "使用 :attr:`side_effect` 来返回包含多个值的序列:"
572574

573575
#: ../../library/unittest.mock.rst:577
574576
msgid "Using a callable:"
575-
msgstr ""
577+
msgstr "使用一个可调用对象:"
576578

577579
#: ../../library/unittest.mock.rst:587
578580
msgid ""
579581
":attr:`side_effect` can be set in the constructor. Here's an example that "
580582
"adds one to the value the mock is called with and returns it:"
581-
msgstr ""
583+
msgstr ":attr:`side_effect` 可以在构造器中设置。 下面是在 mock 被调用时增加一个该属性值并返回它的例子:"
582584

583585
#: ../../library/unittest.mock.rst:597
584586
msgid "Setting :attr:`side_effect` to ``None`` clears it:"

0 commit comments

Comments
 (0)