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

fix: fix render problem in mock-example.po#890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
mattwang44 merged 1 commit intopython:3.12fromken71301:fix-mock-example
May 6, 2024
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletionslibrary/unittest.mock-examples.po
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-09-09 00:03+0000\n"
"PO-Revision-Date: 2024-04-09 00:31+0800\n"
"PO-Revision-Date: 2024-05-06 08:22+0800\n"
"Last-Translator: Liang-Bo Wang <me@liang2.tw>\n"
"Language-Team: Chinese - TAIWAN (https://github.com/python/python-docs-zh-"
"tw)\n"
Expand All@@ -17,7 +17,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Poedit 3.4.1\n"
"X-Generator: Poedit 3.4.2\n"

#: ../../library/unittest.mock-examples.rst:2
msgid ":mod:`unittest.mock` --- getting started"
Expand DownExpand Up@@ -1057,8 +1057,8 @@ msgid ""
"*spec* (or *spec_set*) argument so that the ``MagicMock`` created only has "
"dictionary magic methods available:"
msgstr ""
"*第三個*\\ 選擇是使用 ``MagicMock``,但傳入 ``dict`` 作為 *spec*(或"
"*spec_set*)引數,以使被建立的 ``MagicMock`` 僅具有字典可用的魔術方法:"
"*第三個*\\ 選擇是使用 ``MagicMock``,但傳入 ``dict`` 作為 *spec* (或"
"*spec_set*\\)引數,以使被建立的 ``MagicMock`` 僅具有字典可用的魔術方法:"

#: ../../library/unittest.mock-examples.rst:1034
msgid ""
Expand DownExpand Up@@ -1121,7 +1121,7 @@ msgid ""
"signature is that it takes arbitrary keyword arguments (``**kwargs``) which "
"are then passed onto the mock constructor:"
msgstr ""
"``Mock``(及其各種形式)使用名為 ``_get_child_mock`` 的方法來為屬性和回傳值"
"``Mock``(及其各種形式)使用名為 ``_get_child_mock`` 的方法來為屬性和回傳值"
"建立這些 \"子 mock\"。你可以透過置換此方法來防止你的子類別被用為屬性。其簽名"
"是取用任意的關鍵字引數(``**kwargs``\\ ),然後將其傳遞給 mock 建構函式:"

Expand DownExpand Up@@ -1280,8 +1280,8 @@ msgid ""
"about the order. In this case you can pass ``any_order=True`` to "
"``assert_has_calls``:"
msgstr ""
"有時可能會對一個 mock 進行多次呼叫,而你只對斷言其中\\ *某些*\\ 呼叫感興趣。"
"甚至可能不關心順序。在這種情況下,你可以將 ``any_order=True`` 傳遞給 "
"有時可能會對一個 mock 進行多次呼叫,而你只對斷言其中\\ *某些*\\ 呼叫感興趣。"
"你甚至可能不關心順序。在這種情況下,你可以將 ``any_order=True`` 傳遞給 "
"``assert_has_calls``:"

#: ../../library/unittest.mock-examples.rst:1271
Expand All@@ -1305,8 +1305,8 @@ msgid ""
"attributes of this object then we can create a matcher that will check these "
"attributes for us."
msgstr ""
"假設我們預期某個物件會被傳進 mock,預設情況下,該 mock會根據物件識別性"
"進行相等比較(對使用者定義類別的 Python 預設行為)。要使用 :meth:`~Mock."
"假設我們預期某個物件會被傳進 mock,預設情況下,該 mock會根據物件識別性進行相"
"等比較(對使用者定義類別的 Python 預設行為)。要使用 :meth:`~Mock."
"assert_called_with`,我們需要傳入完全相同的物件。如果我們只對該物件的某些屬性"
"感興趣,那麼我們可以建立一個匹配器來為我們檢查這些屬性。"

Expand DownExpand Up@@ -1342,9 +1342,10 @@ msgid ""
"raised:"
msgstr ""
"``Matcher`` 是用我們想要比較的 ``Foo`` 物件和比較函式實例化的。在 "
"``assert_called_with`` 中,``Matcher`` 相等方法將被呼叫,它將呼叫 mock 時傳入的物件"
"與我們建立匹配器時傳入的物件進行比較。如果它們匹配,則 ``assert_called_with`` 會通"
"過,如果它們不匹配,則會引發 :exc:`AssertionError`:"
"``assert_called_with`` 中,``Matcher`` 相等方法將被呼叫,它將呼叫 mock 時傳入"
"的物件與我們建立匹配器時傳入的物件進行比較。如果它們匹配,則 "
"``assert_called_with`` 會通過,如果它們不匹配,則會引發 :exc:"
"`AssertionError`:"

#: ../../library/unittest.mock-examples.rst:1339
msgid ""
Expand All@@ -1363,7 +1364,7 @@ msgid ""
"integration/#module-hamcrest.library.integration.match_equality>`_)."
msgstr ""
"從版本 1.5 開始,Python 測試函式庫 `PyHamcrest <https://pyhamcrest."
"readthedocs.io/>`_ 以其相等匹配器的形式,提供了類似的功能,在這裡可能是有用的"
"(\\ `hamcrest.library.integration.match_equality <https://pyhamcrest."
"readthedocs.io/>`_ 以其相等匹配器的形式,提供了類似的功能,在這裡可能是有用"
"(\\ `hamcrest.library.integration.match_equality <https://pyhamcrest."
"readthedocs.io/en/release-1.8/integration/#module-hamcrest.library."
"integration.match_equality>`_\\ )。"
Loading

[8]ページ先頭

©2009-2025 Movatter.jp