Skip to content

Commit 7e4f5b2

Browse files
author
github-actions
committed
Merge 3.14 into 3.12
1 parent 40664cd commit 7e4f5b2

4 files changed

Lines changed: 133 additions & 33 deletions

File tree

library/doctest.po

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ msgid ""
150150
"$ python example.py\n"
151151
"$"
152152
msgstr ""
153+
"$ python example.py\n"
154+
"$"
153155

154156
#: ../../library/doctest.rst:96
155157
msgid ""
@@ -222,6 +224,8 @@ msgid ""
222224
"The simplest way to start using doctest (but not necessarily the way you'll "
223225
"continue to do it) is to end each module :mod:`!M` with::"
224226
msgstr ""
227+
"doctest を試す簡単な方法 (とはいえ、いつもそうする必要はないのですが) は、各"
228+
"モジュール :mod:`!M` の最後を、以下のようにして締めくくることです::"
225229

226230
#: ../../library/doctest.rst:152
227231
msgid ""
@@ -233,6 +237,7 @@ msgstr ""
233237
#: ../../library/doctest.rst:156
234238
msgid ":mod:`!doctest` then examines docstrings in module :mod:`!M`."
235239
msgstr ""
240+
"こうすると、 :mod:`!doctest` は :mod:`!M` 中の docstring を検査します。"
236241

237242
#: ../../library/doctest.rst:158
238243
msgid ""
@@ -244,7 +249,7 @@ msgstr ""
244249

245250
#: ../../library/doctest.rst:161
246251
msgid "python M.py"
247-
msgstr ""
252+
msgstr "python M.py"
248253

249254
#: ../../library/doctest.rst:163
250255
msgid ""
@@ -264,7 +269,7 @@ msgstr "一方、``-v`` スイッチをつけて走らせると::"
264269

265270
#: ../../library/doctest.rst:170
266271
msgid "python M.py -v"
267-
msgstr ""
272+
msgstr "python M.py -v"
268273

269274
#: ../../library/doctest.rst:172
270275
msgid ""
@@ -317,6 +322,8 @@ msgid ""
317322
"import doctest\n"
318323
"doctest.testfile(\"example.txt\")"
319324
msgstr ""
325+
"import doctest\n"
326+
"doctest.testfile(\"example.txt\")"
320327

321328
#: ../../library/doctest.rst:197
322329
msgid ""
@@ -416,7 +423,7 @@ msgstr ""
416423

417424
#: ../../library/doctest.rst:253
418425
msgid "Command-line Usage"
419-
msgstr ""
426+
msgstr "コマンドラインでの使用"
420427

421428
#: ../../library/doctest.rst:255
422429
msgid ""
@@ -425,7 +432,7 @@ msgstr ""
425432

426433
#: ../../library/doctest.rst:257
427434
msgid "python -m doctest [-v] [-o OPTION] [-f] file [file ...]"
428-
msgstr ""
435+
msgstr "python -m doctest [-v] [-o OPTION] [-f] file [file ...]"
429436

430437
#: ../../library/doctest.rst:265
431438
msgid ""
@@ -435,14 +442,18 @@ msgstr ""
435442

436443
#: ../../library/doctest.rst:268
437444
msgid "python -m doctest -v example.py"
438-
msgstr ""
445+
msgstr "python -m doctest -v example.py"
439446

440447
#: ../../library/doctest.rst:270
441448
msgid ""
442449
"This will import :file:`example.py` as a standalone module and run :func:"
443450
"`testmod` on it. Note that this may not work correctly if the file is part "
444451
"of a package and imports other submodules from that package."
445452
msgstr ""
453+
"こうすると :file:`example.py` を単体モジュールとしてインポートして、それに対"
454+
"して :func:`testmod` を実行します。このファイルがパッケージの一部で他のサブモ"
455+
"ジュールをそのパッケージからインポートしている場合はうまく動かないことに注意"
456+
"してください。"
446457

447458
#: ../../library/doctest.rst:274
448459
msgid ""
@@ -452,7 +463,7 @@ msgstr ""
452463

453464
#: ../../library/doctest.rst:277
454465
msgid "python -m doctest -v example.txt"
455-
msgstr ""
466+
msgstr "python -m doctest -v example.txt"
456467

457468
#: ../../library/doctest.rst:281
458469
msgid ""
@@ -709,6 +720,13 @@ msgid ""
709720
"names defined earlier in the docstring being run. Examples cannot see names "
710721
"defined in other docstrings."
711722
msgstr ""
723+
"デフォルトでは、 :mod:`doctest` はテストを行うべき docstring を見つけるたび"
724+
"に :mod:`!M` のグローバル名前空間の *浅いコピー* を使い、テストの実行によって"
725+
"モジュールの実際のグローバル名前空間を変更しないようにし、かつ :mod:`!M` 内で"
726+
"行ったテストが痕跡を残して偶発的に別のテストを誤って動作させないようにしてい"
727+
"ます。したがって、実行例中では :mod:`!M` 内のトップレベルで定義されたすべての"
728+
"名前と、 docstring が動作する以前に定義された名前を自由に使えます。個々の実行"
729+
"例は他の docstring 中で定義された名前を参照できません。"
712730

713731
#: ../../library/doctest.rst:447
714732
msgid ""
@@ -1674,6 +1692,13 @@ msgid ""
16741692
"*exclude_empty* argument to the newer :class:`DocTestFinder` constructor "
16751693
"defaults to true."
16761694
msgstr ""
1695+
"オプション引数 *exclude_empty* はデフォルトでは偽になっています。この値を真に"
1696+
"すると、doctest を持たないオブジェクトを考慮から外します。デフォルトの設定は"
1697+
"依存のバージョンとの互換性を考えたハックであり、:meth:`doctest.master."
1698+
"summarize <DocTestRunner.summarize>` と :func:`testmod` を合わせて利用してい"
1699+
"るようなコードでも、テスト実行例を持たないオブジェクトから出力を得るようにし"
1700+
"ています。新たに追加された :class:`DocTestFinder` のコンストラクタの "
1701+
"*exclude_empty* はデフォルトで真になります。"
16771702

16781703
#: ../../library/doctest.rst:993
16791704
msgid ""
@@ -1748,6 +1773,12 @@ msgid ""
17481773
"discovery, include a :ref:`load_tests <load_tests-protocol>` function in "
17491774
"your test module::"
17501775
msgstr ""
1776+
"doctest が付けられたモジュールが大きくなるにつれ、全ての doctest を組織的に実"
1777+
"行したくなるでしょう。 :mod:`doctest` モジュールは 2 つの関数を提供してい"
1778+
"て、 :mod:`unittest` のテストスイートを作り、 doctest を含んだテキストファイ"
1779+
"ルを作成するのに使えます。 :mod:`unittest` のテストディスカバリと組み合わせる"
1780+
"には、テストモジュールに :ref:`load_tests <load_tests-protocol>` 関数を書いて"
1781+
"おいてください::"
17511782

17521783
#: ../../library/doctest.rst:1029
17531784
msgid ""

library/logging.po

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -702,6 +702,9 @@ msgid ""
702702
"into account the relevant :attr:`Logger.propagate` attributes), the message "
703703
"will be sent to the handler set on :data:`lastResort`."
704704
msgstr ""
705+
"このロガー (および :attr:`Logger.propagate` 属性を考慮した上で実効的にイベン"
706+
"トが伝播する祖先のロガー) にハンドラが接続されていない場合、メッセージは :"
707+
"data:`lastResort` に設定されたハンドラーに送られます。"
705708

706709
#: ../../library/logging.rst:347
707710
msgid "The *stack_info* parameter was added."
@@ -2323,6 +2326,12 @@ msgid ""
23232326
"and calling :meth:`Logger.debug` (or other level-specific methods) on it, as "
23242327
"described at the beginning of this documentation."
23252328
msgstr ""
2329+
"非常に短いスクリプトや ``logging`` の機能についての簡単なデモに対しては、 "
2330+
"``debug`` やその他のモジュールレベル関数は便利でしょう。しかしながら、ほとん"
2331+
"どのプログラムはロギングの設定を慎重かつ明示的に制御したいはずです。したがっ"
2332+
"て、このドキュメントの最初に書かれているとおり、モジュールレベルのロガーを生"
2333+
"成してそのロガーに対する :meth:`Logger.debug` メソッド (または他のログレベル"
2334+
"固有のメソッド) を呼び出す方を好むでしょう。"
23262335

23272336
#: ../../library/logging.rst:1213
23282337
msgid ""

library/unittest.mock.po

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ msgid ""
8787
"There is a backport of :mod:`unittest.mock` for earlier versions of Python, "
8888
"available as :pypi:`mock` on PyPI."
8989
msgstr ""
90+
"以前の Python バージョン向けにバックポートされた :mod:`unittest.mock` があ"
91+
"り、 :pypi:`mock` on PyPIとして利用可能です。"
9092

9193
#: ../../library/unittest.mock.rst:41
9294
msgid "Quick Guide"
@@ -109,6 +111,8 @@ msgid ""
109111
":attr:`~Mock.side_effect` allows you to perform side effects, including "
110112
"raising an exception when a mock is called:"
111113
msgstr ""
114+
":attr:`~Mock.side_effect` によって、モック呼び出し時の例外発生などの副作用を"
115+
"実行できます:"
112116

113117
#: ../../library/unittest.mock.rst:92
114118
msgid ""
@@ -322,6 +326,9 @@ msgid ""
322326
"__class__` returns the class of the spec object. This allows mocks to pass :"
323327
"func:`isinstance` tests."
324328
msgstr ""
329+
"*spec* が (文字列のリストではなく) オブジェクトの場合、 :attr:`~object."
330+
"__class__` はスペックオブジェクトのクラスを返します。これによってモックが :"
331+
"func:`isinstance` テストに通るようになります。"
325332

326333
#: ../../library/unittest.mock.rst:245
327334
msgid ""
@@ -821,12 +828,18 @@ msgid ""
821828
"class instead. This allows mock objects to pass :func:`isinstance` tests for "
822829
"the object they are replacing / masquerading as:"
823830
msgstr ""
831+
"通常、オブジェクトの :attr:`!__class__` 属性はその型を返します。 :attr:`!"
832+
"spec` を設定したオブジェクトの場合、 :attr:`!__class__` は代わりに :attr:"
833+
"`spec` のクラスを返します。これにより、置き換え / 偽装しているオブジェクトに"
834+
"対する :func:`isinstance` も通過することができます:"
824835

825836
#: ../../library/unittest.mock.rst:772
826837
msgid ""
827838
":attr:`!__class__` is assignable to, this allows a mock to pass an :func:"
828839
"`isinstance` check without forcing you to use a spec:"
829840
msgstr ""
841+
":attr:`!__class__` は書き換え可能で、 :func:`isinstance` を通るために必ず "
842+
"spec を使う必要はありません:"
830843

831844
#: ../../library/unittest.mock.rst:782
832845
msgid ""
@@ -842,6 +855,8 @@ msgid ""
842855
"Mock objects that use a class or an instance as a :attr:`!spec` or :attr:`!"
843856
"spec_set` are able to pass :func:`isinstance` tests:"
844857
msgstr ""
858+
":attr:`!spec` か :attr:`!spec_set` にクラスかインスタンスを渡した mock は :"
859+
"func:`isinstance` テストをパスします:"
845860

846861
#: ../../library/unittest.mock.rst:796
847862
msgid ""
@@ -920,6 +935,9 @@ msgid ""
920935
"__get__` and :meth:`~object.__set__` methods so you can specify a return "
921936
"value when it is fetched."
922937
msgstr ""
938+
":class:`property` もしくは:term:`デスクリプタ <descriptor>` として使われるた"
939+
"めのモックです。 :class:`PropertyMock` は、 :meth:`~object.__get__` と :meth:"
940+
"`~object.__set__` メソッドを提供し、戻り値を指定することができます。"
923941

924942
#: ../../library/unittest.mock.rst:854
925943
msgid ""
@@ -988,7 +1006,7 @@ msgstr ""
9881006

9891007
#: ../../library/unittest.mock.rst:898
9901008
msgid "See :meth:`~object.__getattr__` for details."
991-
msgstr ""
1009+
msgstr "詳細は :meth:`~object.__getattr__` を参照してください。"
9921010

9931011
#: ../../library/unittest.mock.rst:903
9941012
msgid ""

0 commit comments

Comments
 (0)