@@ -11,16 +11,16 @@ msgstr ""
11
11
"Project-Id-Version : Python 3.12\n "
12
12
"Report-Msgid-Bugs-To : \n "
13
13
"POT-Creation-Date : 2023-07-22 00:04+0000\n "
14
- "PO-Revision-Date : 2022-10-16 06:03+0800 \n "
15
- "Last-Translator : Adrian Liaw <adrianliaw2000@gmail.com >\n "
16
- "Language-Team : Chinese - TAIWAN (https ://github. com/python/python-docs-zh- "
17
- "tw) \n "
18
- "Language : zh_TW \n "
14
+ "PO-Revision-Date : 2023-08-20 06:53+0000 \n "
15
+ "Last-Translator : Anonymous <noreply@weblate.org >\n "
16
+ "Language-Team : unittest (generated) <http ://weblate.example. com/projects/ "
17
+ "test/python/unittest/> \n "
18
+ "Language : unittest \n "
19
19
"MIME-Version : 1.0\n "
20
20
"Content-Type : text/plain; charset=UTF-8\n "
21
21
"Content-Transfer-Encoding : 8bit\n "
22
22
"Plural-Forms : nplurals=1; plural=0;\n "
23
- "X-Generator : Poedit 3.1.1 \n "
23
+ "X-Generator : Weblate 4.18.2 \n "
24
24
25
25
#: ../../library/unittest.rst:2
26
26
msgid ":mod:`unittest` --- Unit testing framework"
@@ -35,8 +35,8 @@ msgid ""
35
35
"(If you are already familiar with the basic concepts of testing, you might "
36
36
"want to skip to :ref:`the list of assert methods <assert-methods>`.)"
37
37
msgstr ""
38
- "(假如你已經熟悉相關基礎的測試概念,你可能會希望跳過以下段落,直接參考 :ref:"
39
- "` assert 方法清單 <assert-methods>`\\ 。)"
38
+ "(假如你已經熟悉相關基礎的測試概念,你可能會希望跳過以下段落,直接參考 :ref:` "
39
+ "assert 方法清單 <assert-methods>`\\ 。)"
40
40
41
41
#: ../../library/unittest.rst:19
42
42
msgid ""
@@ -67,9 +67,10 @@ msgid ""
67
67
"example, creating temporary or proxy databases, directories, or starting a "
68
68
"server process."
69
69
msgstr ""
70
- "一個 :dfn:`test fixture` 代表執行一個或多個測試所需要的準備,以及其他相關清理"
71
- "操作,例如可以是建立臨時性的或是代理用 (proxy) 資料庫、目錄、或是啟動一個伺服"
72
- "器程序。"
70
+ "一個 :dfn:`test fixture` "
71
+ "代表執行一個或多個測試所需要的準備,以及其他相關清理操作,"
72
+ "例如可以是建立臨時性的或是代理用 (proxy) "
73
+ "資料庫、目錄、或是啟動一個伺服器程序。"
73
74
74
75
#: ../../library/unittest.rst:37
75
76
msgid "test case"
@@ -81,9 +82,10 @@ msgid ""
81
82
"specific response to a particular set of inputs. :mod:`unittest` provides a "
82
83
"base class, :class:`TestCase`, which may be used to create new test cases."
83
84
msgstr ""
84
- "一個 :dfn:`test case` 是一個獨立的單元測試。這是用來確認一個特定設定的輸入的"
85
- "特殊回饋。 :mod:`unittest` 提供一個基礎類別,類別 :class:`TestCase`\\ ,可以"
86
- "用來建立一個新的測試條例。"
85
+ "一個 :dfn:`test case` "
86
+ "是一個獨立的單元測試。這是用來確認一個特定設定的輸入的特殊回饋。 "
87
+ ":mod:`unittest` 提供一個基礎類別,類別 :class:`TestCase`\\ "
88
+ ",可以用來建立一個新的測試條例。"
87
89
88
90
#: ../../library/unittest.rst:41
89
91
msgid "test suite"
@@ -93,9 +95,8 @@ msgstr "test suite(測試套件)"
93
95
msgid ""
94
96
"A :dfn:`test suite` is a collection of test cases, test suites, or both. It "
95
97
"is used to aggregate tests that should be executed together."
96
- msgstr ""
97
- ":dfn:`test suite` 是一個搜集測試條例,測試套件,或是兩者皆有。它需要一起被執"
98
- "行並用來匯總測試。"
98
+ msgstr ":dfn:`test suite` "
99
+ "是一個搜集測試條例,測試套件,或是兩者皆有。它需要一起被執行並用來匯總測試。"
99
100
100
101
#: ../../library/unittest.rst:48
101
102
msgid "test runner"
@@ -124,8 +125,8 @@ msgid ""
124
125
"`Simple Smalltalk Testing: With Patterns <https://web.archive.org/"
125
126
"web/20150315073817/http://www.xprogramming.com/testfram.htm>`_"
126
127
msgstr ""
127
- "`Simple Smalltalk Testing: With Patterns <https://web.archive.org/"
128
- "web/ 20150315073817/http://www.xprogramming.com/testfram.htm>`_"
128
+ "`Simple Smalltalk Testing: With Patterns <https://web.archive.org/web/ "
129
+ "20150315073817/http://www.xprogramming.com/testfram.htm>`_"
129
130
130
131
#: ../../library/unittest.rst:56
131
132
msgid ""
@@ -141,8 +142,7 @@ msgstr "`pytest <https://docs.pytest.org/>`_"
141
142
msgid ""
142
143
"Third-party unittest framework with a lighter-weight syntax for writing "
143
144
"tests. For example, ``assert func(10) == 42``."
144
- msgstr ""
145
- "第三方的單元測試框架,但在撰寫測試時使用更輕量的語法。例如: ``assert "
145
+ msgstr "第三方的單元測試框架,但在撰寫測試時使用更輕量的語法。例如: ``assert "
146
146
"func(10) == 42``\\ 。"
147
147
148
148
#: ../../library/unittest.rst:65
@@ -157,9 +157,8 @@ msgstr ""
157
157
msgid ""
158
158
"An extensive list of Python testing tools including functional testing "
159
159
"frameworks and mock object libraries."
160
- msgstr ""
161
- "一份詳細的 Python 測試工具列表,包含 functional testing 框架和mock object 函"
162
- "式庫。"
160
+ msgstr "一份詳細的 Python 測試工具列表,包含 functional testing 框架和mock object "
161
+ "函式庫。"
163
162
164
163
#: ../../library/unittest.rst:69
165
164
msgid ""
@@ -195,8 +194,7 @@ msgid ""
195
194
"The :mod:`unittest` module provides a rich set of tools for constructing and "
196
195
"running tests. This section demonstrates that a small subset of the tools "
197
196
"suffice to meet the needs of most users."
198
- msgstr ""
199
- ":mod:`unittest` 模組提供一系列豐富的工具用來建構與執行測試。本節將展示這一系"
197
+ msgstr ":mod:`unittest` 模組提供一系列豐富的工具用來建構與執行測試。本節將展示這一系"
200
198
"列工具中一部份,它們已能滿足大部份使用者需求。"
201
199
202
200
#: ../../library/unittest.rst:89
@@ -213,9 +211,9 @@ msgid ""
213
211
"``test``. This naming convention informs the test runner about which "
214
212
"methods represent tests."
215
213
msgstr ""
216
- "測試用例 (testcase) 可以透過繼承 :class:`unittest.TestCase` 類別來建立。這裡 "
217
- "定義了三個獨立的物件方法 ,名稱皆以 ``test`` 開頭。這樣的命名方式能告知 test "
218
- "runner 哪些物件方法為定義的測試。"
214
+ "測試用例 (testcase) 可以透過繼承 :class:`unittest.TestCase` "
215
+ "類別來建立。這裡定義了三個獨立的物件方法 ,名稱皆以 ``test`` 開頭。"
216
+ "這樣的命名方式能告知 test runner 哪些物件方法為定義的測試。"
219
217
220
218
#: ../../library/unittest.rst:118
221
219
msgid ""
@@ -226,11 +224,12 @@ msgid ""
226
224
"instead of the :keyword:`assert` statement so the test runner can accumulate "
227
225
"all test results and produce a report."
228
226
msgstr ""
229
- "每個測試的關鍵為呼叫 :meth:`~TestCase.assertEqual` 來確認是否為期望的結果; :"
230
- "meth:`~TestCase.assertTrue` 或是 :meth:`~TestCase.assertFalse` 用來驗證一個條"
231
- "件式; :meth:`~TestCase.assertRaises` 用來驗證是否觸發一個特定的 exception。"
232
- "使用這些物件方法來取代 :keyword:`assert` 陳述句,將能使 test runner 收集所有"
233
- "的測試結果並產生一個報表。"
227
+ "每個測試的關鍵為呼叫 :meth:`~TestCase.assertEqual` 來確認是否為期望的結果; "
228
+ ":meth:`~TestCase.assertTrue` 或是 :meth:`~TestCase.assertFalse` "
229
+ "用來驗證一個條件式; :meth:`~TestCase.assertRaises` "
230
+ "用來驗證是否觸發一個特定的 exception。使用這些物件方法來取代 "
231
+ ":keyword:`assert` 陳述句,將能使 test runner "
232
+ "收集所有的測試結果並產生一個報表。"
234
233
235
234
#: ../../library/unittest.rst:125
236
235
msgid ""
@@ -246,8 +245,8 @@ msgid ""
246
245
"provides a command-line interface to the test script. When run from the "
247
246
"command line, the above script produces an output that looks like this::"
248
247
msgstr ""
249
- "最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` 提供一個命令執行列介 "
250
- "面測試腳本 。當透過命令執行列執行,輸出結果將會像是:\n"
248
+ "最後將顯示一個簡單的方法去執行測試 :func:`unittest.main` "
249
+ "提供一個命令執行列介面測試腳本 。當透過命令執行列執行,輸出結果將會像是:\n"
251
250
"\n"
252
251
"::"
253
252
@@ -257,8 +256,8 @@ msgid ""
257
256
"main` to enable a higher level of verbosity, and produce the following "
258
257
"output::"
259
258
msgstr ""
260
- "在測試時加入 ``-v`` 選項將指示 :func:`unittest.main` 提高 verbosity 層級,產 "
261
- "生以下的輸出 :\n"
259
+ "在測試時加入 ``-v`` 選項將指示 :func:`unittest.main` 提高 verbosity "
260
+ "層級,產生以下的輸出 :\n"
262
261
"\n"
263
262
"::"
264
263
@@ -311,9 +310,9 @@ msgid ""
311
310
"separators into '.'. If you want to execute a test file that isn't "
312
311
"importable as a module you should execute the file directly instead."
313
312
msgstr ""
314
- "這允許你使用 shell 檔案名稱補完功能 (filename completion) 來指定測試模組。給 "
315
- "定的檔案路徑必須亦能被當作模組 import。此路徑轉換為模組名稱的方式為移除 '. "
316
- "py' 並將路徑分隔符 (path separator) 轉換成 '.'。 假如你的測試檔案無法被 "
313
+ "這允許你使用 shell 檔案名稱補完功能 (filename completion) 來指定測試模組。"
314
+ "給定的檔案路徑必須亦能被當作模組 import。此路徑轉換為模組名稱的方式為移除 "
315
+ "'. py' 並將路徑分隔符 (path separator) 轉換成 '.'。 假如你的測試檔案無法被 "
317
316
"import 成模組,你應該直接執行該測試檔案。"
318
317
319
318
#: ../../library/unittest.rst:185
@@ -370,8 +369,9 @@ msgid ""
370
369
"then reports all the results so far. A second :kbd:`Control-C` raises the "
371
370
"normal :exc:`KeyboardInterrupt` exception."
372
371
msgstr ""
373
- ":kbd:`Control-C` 測試執行過程中等待正確的測試結果並回報目前為止所有的測試結"
374
- "果。第二個 :kbd:`Control-C` 拋出一般例外 :exc:`KeyboardInterrupt`\\ 。"
372
+ ":kbd:`Control-C` "
373
+ "測試執行過程中等待正確的測試結果並回報目前為止所有的測試結果。第二個 "
374
+ ":kbd:`Control-C` 拋出一般例外 :exc:`KeyboardInterrupt`\\ 。"
375
375
376
376
#: ../../library/unittest.rst:221
377
377
msgid ""
@@ -437,8 +437,7 @@ msgstr "命令列選項 ``--durations``。"
437
437
msgid ""
438
438
"The command line can also be used for test discovery, for running all of the "
439
439
"tests in a project or just a subset."
440
- msgstr ""
441
- "對執行所有的專案或是一個子集合測試,命令列模式可以可以被用來做測試探索。"
440
+ msgstr "對執行所有的專案或是一個子集合測試,命令列模式可以可以被用來做測試探索。"
442
441
443
442
#: ../../library/unittest.rst:269
444
443
msgid "Test Discovery"
@@ -452,18 +451,18 @@ msgid ""
452
451
"project (this means that their filenames must be valid :ref:`identifiers "
453
452
"<identifiers>`)."
454
453
msgstr ""
455
- "單元測試支援簡單的 test discovery(測試探索)。為了相容於測試探索,所有的測試 "
456
- "檔案都要是 \\ :ref:`模組 <tut-modules>`\\ 或是\\ :ref:`套件 <tut-packages>`, "
457
- "並能從專案的最上層目錄中 import(代表它們的檔案名稱必須是有效的 :ref: "
458
- "`identifiers <identifiers>`\\ )。"
454
+ "單元測試支援簡單的 test discovery(測試探索)。為了相容於測試探索,"
455
+ "所有的測試檔案都要是 \\ :ref:`模組 <tut-modules>`\\ 或是\\ :ref:`套件 <tut-"
456
+ "packages>`, 並能從專案的最上層目錄中 import(代表它們的檔案名稱必須是有效的 "
457
+ ":ref: `identifiers <identifiers>`\\ )。"
459
458
460
459
#: ../../library/unittest.rst:279
461
460
msgid ""
462
461
"Test discovery is implemented in :meth:`TestLoader.discover`, but can also "
463
462
"be used from the command line. The basic command-line usage is::"
464
463
msgstr ""
465
- "Test discovery(測試探索)實作在 :meth:`TestLoader.discover`\\ ,但也可以被用 "
466
- "於命令列模式 。基本的命令列模式用法如下:\n"
464
+ "Test discovery(測試探索)實作在 :meth:`TestLoader.discover`\\ "
465
+ ",但也可以被用於命令列模式 。基本的命令列模式用法如下:\n"
467
466
"\n"
468
467
"::"
469
468
@@ -473,9 +472,8 @@ msgid ""
473
472
"unittest discover``. If you want to pass arguments to test discovery the "
474
473
"``discover`` sub-command must be used explicitly."
475
474
msgstr ""
476
- "``python -m unittest`` 作為捷徑,其功能相當於 ``python -m unittest "
477
- "discover``\\ 。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` "
478
- "子指令。"
475
+ "``python -m unittest`` 作為捷徑,其功能相當於 ``python -m unittest discover``"
476
+ "\\ 。假如你想傳遞引數至探索測試的話,一定要明確地加入 ``discover`` 子指令。"
479
477
480
478
#: ../../library/unittest.rst:291
481
479
msgid "The ``discover`` sub-command has the following options:"
@@ -503,8 +501,8 @@ msgid ""
503
501
"positional arguments in that order. The following two command lines are "
504
502
"equivalent::"
505
503
msgstr ""
506
- ":option:`-s`, :option:`-p`, 和 :option:`-t` 選項依照傳遞位置作為引數排序順 "
507
- "序 。以下兩個命令列被視為等價:\n"
504
+ ":option:`-s`, :option:`-p`, 和 :option:`-t` "
505
+ "選項依照傳遞位置作為引數排序順序 。以下兩個命令列被視為等價:\n"
508
506
"\n"
509
507
"::"
510
508
0 commit comments