Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3c581d0

Browse files
committed
fix: 根據comment修正
1 parent27ff3e8 commit3c581d0

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎library/unittest.mock-examples.po

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgstr ""
88
"Project-Id-Version:Python 3.12\n"
99
"Report-Msgid-Bugs-To:\n"
1010
"POT-Creation-Date:2023-09-09 00:03+0000\n"
11-
"PO-Revision-Date:2023-11-12 22:06+0800\n"
11+
"PO-Revision-Date:2023-11-21 22:16+0800\n"
1212
"Last-Translator:Liang-Bo Wang <me@liang2.tw>\n"
1313
"Language-Team:Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
1414
"tw)\n"
@@ -29,7 +29,7 @@ msgstr "使用 Mock 的方式"
2929

3030
#:../../library/unittest.mock-examples.rst:30
3131
msgid"Mock Patching Methods"
32-
msgstr"使用 Mock 來 patching methods(方法)"
32+
msgstr"使用 Mock 來 patching methods 方法"
3333

3434
#:../../library/unittest.mock-examples.rst:32
3535
msgid"Common uses for :class:`Mock` objects include:"
@@ -56,17 +56,17 @@ msgid ""
5656
"Once our mock has been used (``real.method`` in this example) it has methods "
5757
"and attributes that allow you to make assertions about how it has been used."
5858
msgstr""
59-
"一旦我們的 mock 已經被使用(例如在這個範例中的 ``real.method``),它就有了方"
60-
"法和屬性,允許你對其使用方式進行assertions (斷言)。"
59+
"一旦我們的 mock 已經被使用(例如在這個範例中的 ``real.method``\\ ),它就有了"
60+
"方法和屬性,允許你對其使用方式進行斷言 (assertions)。"
6161

6262
#:../../library/unittest.mock-examples.rst:50
6363
msgid""
6464
"In most of these examples the :class:`Mock` and :class:`MagicMock` classes "
6565
"are interchangeable. As the ``MagicMock`` is the more capable class it makes "
6666
"a sensible one to use by default."
6767
msgstr""
68-
"在大多數的範例中,:class:`Mock` 和 :class:`MagicMock`class(類別)是可以互換"
69-
"的。不過由於 ``MagicMock`` 是功能更強大的類別,因此通常它是一個更好的選擇。"
68+
"在大多數的範例中,:class:`Mock` 和 :class:`MagicMock`類別是可以互換的。不過"
69+
"由於 ``MagicMock`` 是功能更強大的類別,因此通常它是一個更好的選擇。"
7070

7171
#:../../library/unittest.mock-examples.rst:54
7272
msgid""
@@ -89,7 +89,7 @@ msgstr ""
8989

9090
#:../../library/unittest.mock-examples.rst:76
9191
msgid"Mock for Method Calls on an Object"
92-
msgstr"在物件上的方法呼叫時使用 mock"
92+
msgstr"對物件的方法呼叫使用 mock"
9393

9494
#:../../library/unittest.mock-examples.rst:78
9595
msgid""
@@ -99,16 +99,16 @@ msgid ""
9999
"used in the correct way."
100100
msgstr""
101101
"在上一個範例中,我們直接對物件上的方法進行 patch,以檢查它是否被正確呼叫。另"
102-
"一個常見的用法是將一個物件傳遞給一個方法(或測試系統的某一部分),然後檢查它"
102+
"一個常見的用法是將一個物件傳遞給一個方法(或受測系統的某一部分),然後檢查它"
103103
"是否以正確的方式被使用。"
104104

105105
#:../../library/unittest.mock-examples.rst:83
106106
msgid""
107107
"The simple ``ProductionClass`` below has a ``closer`` method. If it is "
108108
"called with an object then it calls ``close`` on it."
109109
msgstr""
110-
"下面是一個含有 ``closer`` 方法的單純的 ``ProductionClass``。如果它被一個物件"
111-
"呼叫,它就會呼叫此物件中的 ``close``。"
110+
"下面是一個單純的 ``ProductionClass``,含有一個 ``closer`` 方法。如果它被傳入"
111+
"一個物件,它就會呼叫此物件中的 ``close``。"
112112

113113
#:../../library/unittest.mock-examples.rst:91
114114
msgid""
@@ -125,9 +125,9 @@ msgid ""
125125
"accessing it in the test will create it, but :meth:`~Mock."
126126
"assert_called_with` will raise a failure exception."
127127
msgstr""
128-
"我們不必為我們的 mock 提供 'close' 方法存取 close 會建立它。因此,如果"
129-
"'close' 並未被呼叫過,在測試流程中存取 'close' 就會建立它,但 :meth:`~Mock."
130-
"assert_called_with` 就會引發一個失敗的例外。"
128+
"我們不必做任何額外的事情來為 mock 提供 'close' 方法存取 close 會建立它。"
129+
"此,如果'close' 並未被呼叫過,在測試中存取 'close' 就會建立它,但 :meth:"
130+
"`~Mock.assert_called_with` 就會引發一個失敗的例外。"
131131

132132
#:../../library/unittest.mock-examples.rst:106
133133
msgid"Mocking Classes"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp