-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathdoctest.po
More file actions
3635 lines (3245 loc) · 164 KB
/
doctest.po
File metadata and controls
3635 lines (3245 loc) · 164 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2017, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-11 20:40+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dong-gweon Oh <flowdas@gmail.com>\n"
"Language-Team: Korean (https://python.flowdas.com)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"
#: ../../library/doctest.rst:2
msgid ":mod:`!doctest` --- Test interactive Python examples"
msgstr ":mod:`!doctest` --- 대화형 파이썬 예제 테스트"
#: ../../library/doctest.rst:12
msgid "**Source code:** :source:`Lib/doctest.py`"
msgstr "**소스 코드:** :source:`Lib/doctest.py`"
#: ../../library/doctest.rst:16
msgid ""
"The :mod:`doctest` module searches for pieces of text that look like "
"interactive Python sessions, and then executes those sessions to verify "
"that they work exactly as shown. There are several common ways to use "
"doctest:"
msgstr ""
":mod:`doctest` 모듈은 대화형 파이썬 세션처럼 보이는 텍스트를 검색한 다음, 해당 세션을 실행하여 표시된 대로 정확하게 "
"작동하는지 검증합니다. doctest를 사용하는 몇 가지 일반적인 방법이 있습니다:"
#: ../../library/doctest.rst:20
msgid ""
"To check that a module's docstrings are up-to-date by verifying that all "
"interactive examples still work as documented."
msgstr "모든 대화식 예제가 설명된 대로 작동하는지 확인하여 모듈의 독스트링이 최신인지 확인합니다."
#: ../../library/doctest.rst:23
msgid ""
"To perform regression testing by verifying that interactive examples from"
" a test file or a test object work as expected."
msgstr "테스트 파일이나 테스트 객체의 대화형 예제가 예상대로 작동하는지 확인하여 회귀 테스트를 수행합니다."
#: ../../library/doctest.rst:26
msgid ""
"To write tutorial documentation for a package, liberally illustrated with"
" input-output examples. Depending on whether the examples or the "
"expository text are emphasized, this has the flavor of \"literate "
"testing\" or \"executable documentation\"."
msgstr ""
"입/출력 예제를 그대로 보여줌으로써 패키지에 대한 자습서를 작성합니다. 예제나 설명문 중 어느 것이 강조되는지에 따라, \"문학적 "
"테스트(literate testing)\"나 \"실행 가능한 설명서(executable documentation)\"의 느낌을 "
"줍니다."
#: ../../library/doctest.rst:31
msgid "Here's a complete but small example module::"
msgstr "여기에 완전하지만 작은 예제 모듈이 있습니다::"
#: ../../library/doctest.rst:33
msgid ""
"\"\"\"\n"
"This is the \"example\" module.\n"
"\n"
"The example module supplies one function, factorial(). For example,\n"
"\n"
">>> factorial(5)\n"
"120\n"
"\"\"\"\n"
"\n"
"def factorial(n):\n"
" \"\"\"Return the factorial of n, an exact integer >= 0.\n"
"\n"
" >>> [factorial(n) for n in range(6)]\n"
" [1, 1, 2, 6, 24, 120]\n"
" >>> factorial(30)\n"
" 265252859812191058636308480000000\n"
" >>> factorial(-1)\n"
" Traceback (most recent call last):\n"
" ...\n"
" ValueError: n must be >= 0\n"
"\n"
" Factorials of floats are OK, but the float must be an exact integer:\n"
" >>> factorial(30.1)\n"
" Traceback (most recent call last):\n"
" ...\n"
" ValueError: n must be exact integer\n"
" >>> factorial(30.0)\n"
" 265252859812191058636308480000000\n"
"\n"
" It must also not be ridiculously large:\n"
" >>> factorial(1e100)\n"
" Traceback (most recent call last):\n"
" ...\n"
" OverflowError: n too large\n"
" \"\"\"\n"
"\n"
" import math\n"
" if not n >= 0:\n"
" raise ValueError(\"n must be >= 0\")\n"
" if math.floor(n) != n:\n"
" raise ValueError(\"n must be exact integer\")\n"
" if n+1 == n: # catch a value like 1e300\n"
" raise OverflowError(\"n too large\")\n"
" result = 1\n"
" factor = 2\n"
" while factor <= n:\n"
" result *= factor\n"
" factor += 1\n"
" return result\n"
"\n"
"\n"
"if __name__ == \"__main__\":\n"
" import doctest\n"
" doctest.testmod()"
msgstr ""
"\"\"\"\n"
"이것은 \"예제\" 모듈입니다.\n"
"\n"
"예제 모듈은 factorial() 함수 하나를 제공합니다. 예를 들어,\n"
"\n"
">>> factorial(5)\n"
"120\n"
"\"\"\"\n"
"\n"
"def factorial(n):\n"
" \"\"\"n의 계승을 반환합니다, 정확한 정수 >= 0.\n"
"\n"
" >>> [factorial(n) for n in range(6)]\n"
" [1, 1, 2, 6, 24, 120]\n"
" >>> factorial(30)\n"
" 265252859812191058636308480000000\n"
" >>> factorial(-1)\n"
" Traceback (most recent call last):\n"
" ...\n"
" ValueError: n must be >= 0\n"
"\n"
" float의 계승도 좋습니다만, float는 정확한 정수여야 합니다:\n"
" >>> factorial(30.1)\n"
" Traceback (most recent call last):\n"
" ...\n"
" ValueError: n must be exact integer\n"
" >>> factorial(30.0)\n"
" 265252859812191058636308480000000\n"
"\n"
" 또한 터무니없이 크지 않아야 합니다:\n"
" >>> factorial(1e100)\n"
" Traceback (most recent call last):\n"
" ...\n"
" OverflowError: n too large\n"
" \"\"\"\n"
"\n"
" import math\n"
" if not n >= 0:\n"
" raise ValueError(\"n must be >= 0\")\n"
" if math.floor(n) != n:\n"
" raise ValueError(\"n must be exact integer\")\n"
" if n+1 == n: # 1e300과 같은 값을 잡아냅니다\n"
" raise OverflowError(\"n too large\")\n"
" result = 1\n"
" factor = 2\n"
" while factor <= n:\n"
" result *= factor\n"
" factor += 1\n"
" return result\n"
"\n"
"\n"
"if __name__ == \"__main__\":\n"
" import doctest\n"
" doctest.testmod()"
#: ../../library/doctest.rst:88
msgid ""
"If you run :file:`example.py` directly from the command line, "
":mod:`doctest` works its magic:"
msgstr ":file:`example.py`\\를 명령 줄에서 직접 실행하면, :mod:`doctest`\\가 마술을 부리기 시작합니다:"
#: ../../library/doctest.rst:91
msgid ""
"$ python example.py\n"
"$"
msgstr ""
"$ python example.py\n"
"$"
#: ../../library/doctest.rst:96
msgid ""
"There's no output! That's normal, and it means all the examples worked."
" Pass ``-v`` to the script, and :mod:`doctest` prints a detailed log of "
"what it's trying, and prints a summary at the end:"
msgstr ""
"출력이 없습니다! 이것이 정상이며, 모든 예제가 작동했다는 것을 뜻합니다. ``-v``\\를 스크립트에 전달하면, "
":mod:`doctest`\\는 시도하고 있는 내용에 대한 자세한 로그를 출력하고 끝에 요약을 인쇄합니다.:"
#: ../../library/doctest.rst:100
msgid ""
"$ python example.py -v\n"
"Trying:\n"
" factorial(5)\n"
"Expecting:\n"
" 120\n"
"ok\n"
"Trying:\n"
" [factorial(n) for n in range(6)]\n"
"Expecting:\n"
" [1, 1, 2, 6, 24, 120]\n"
"ok"
msgstr ""
"$ python example.py -v\n"
"Trying:\n"
" factorial(5)\n"
"Expecting:\n"
" 120\n"
"ok\n"
"Trying:\n"
" [factorial(n) for n in range(6)]\n"
"Expecting:\n"
" [1, 1, 2, 6, 24, 120]\n"
"ok"
#: ../../library/doctest.rst:114
msgid "And so on, eventually ending with:"
msgstr "결국, 다음과 같이 끝납니다:"
#: ../../library/doctest.rst:116
msgid ""
"Trying:\n"
" factorial(1e100)\n"
"Expecting:\n"
" Traceback (most recent call last):\n"
" ...\n"
" OverflowError: n too large\n"
"ok\n"
"2 items passed all tests:\n"
" 1 test in __main__\n"
" 6 tests in __main__.factorial\n"
"7 tests in 2 items.\n"
"7 passed.\n"
"Test passed.\n"
"$"
msgstr ""
"Trying:\n"
" factorial(1e100)\n"
"Expecting:\n"
" Traceback (most recent call last):\n"
" ...\n"
" OverflowError: n too large\n"
"ok\n"
"2 items passed all tests:\n"
" 1 test in __main__\n"
" 6 tests in __main__.factorial\n"
"7 tests in 2 items.\n"
"7 passed.\n"
"Test passed.\n"
"$"
#: ../../library/doctest.rst:133
msgid ""
"That's all you need to know to start making productive use of "
":mod:`doctest`! Jump in. The following sections provide full details. "
"Note that there are many examples of doctests in the standard Python test"
" suite and libraries. Especially useful examples can be found in the "
"standard test file :file:`Lib/test/test_doctest/test_doctest.py`."
msgstr ""
"이것이 :mod:`doctest`\\를 생산적으로 사용하기 위해서 알아야 할 모든 것입니다! 시도해 보세요. 다음 절에서는 자세한 "
"내용을 제공합니다. 표준 파이썬 테스트 스위트와 라이브러리에는 doctest 예제가 많습니다. 특히 유용한 예제는 표준 테스트 파일"
" :file:`Lib/test/test_doctest/test_doctest.py`\\에서 찾을 수 있습니다."
#: ../../library/doctest.rst:139
msgid ""
"Output is colorized by default and can be :ref:`controlled using "
"environment variables <using-on-controlling-color>`."
msgstr ""
#: ../../library/doctest.rst:147
msgid "Simple Usage: Checking Examples in Docstrings"
msgstr "간단한 사용법: 독스트링에 있는 예제 확인하기"
#: ../../library/doctest.rst:149
msgid ""
"The simplest way to start using doctest (but not necessarily the way "
"you'll continue to do it) is to end each module :mod:`!M` with::"
msgstr ""
"doctest를 사용하는 가장 간단한 방법은 (하지만 계속 이렇게 할 필요는 없습니다) 각 모듈 :mod:`!M`\\을 다음과 같이"
" 끝내는 것입니다::"
#: ../../library/doctest.rst:152
msgid ""
"if __name__ == \"__main__\":\n"
" import doctest\n"
" doctest.testmod()"
msgstr ""
"if __name__ == \"__main__\":\n"
" import doctest\n"
" doctest.testmod()"
#: ../../library/doctest.rst:156
msgid ":mod:`!doctest` then examines docstrings in module :mod:`!M`."
msgstr "그러면 :mod:`!doctest`\\는 모듈 :mod:`!M`\\의 독스트링을 검사합니다."
#: ../../library/doctest.rst:158
msgid ""
"Running the module as a script causes the examples in the docstrings to "
"get executed and verified::"
msgstr "모듈을 스크립트로 실행하면 독스트링의 예제가 실행되고 검증됩니다::"
#: ../../library/doctest.rst:161
msgid "python M.py"
msgstr "python M.py"
#: ../../library/doctest.rst:163
msgid ""
"This won't display anything unless an example fails, in which case the "
"failing example(s) and the cause(s) of the failure(s) are printed to "
"stdout, and the final line of output is ``***Test Failed*** N "
"failures.``, where *N* is the number of examples that failed."
msgstr ""
"예제가 실패하지 않는 한 아무것도 표시되지 않습니다, 실패하면 실패한 예제와 실패 원인이 stdout으로 출력되고, 마지막 출력 "
"줄은 ``***Test Failed*** N failures.``\\입니다. 여기서 *N*\\은 실패한 예제의 수입니다."
#: ../../library/doctest.rst:168
msgid "Run it with the ``-v`` switch instead::"
msgstr "대신 ``-v`` 스위치로 실행해 보십시오::"
#: ../../library/doctest.rst:170
msgid "python M.py -v"
msgstr "python M.py -v"
#: ../../library/doctest.rst:172
msgid ""
"and a detailed report of all examples tried is printed to standard "
"output, along with assorted summaries at the end."
msgstr "그러면 시도한 모든 예제에 대한 자세한 보고서가 표준 출력으로 출력되고, 끝에 정돈된 요약이 붙습니다."
#: ../../library/doctest.rst:175
#, fuzzy
msgid ""
"You can force verbose mode by passing ``verbose=True`` to "
":func:`testmod`, or prohibit it by passing ``verbose=False``. In either "
"of those cases, :data:`sys.argv` is not examined by :func:`testmod` (so "
"passing ``-v`` or not has no effect)."
msgstr ""
"``verbose=True``\\를 :func:`testmod`\\에 전달하여 상세 모드를 강제하거나, "
"``verbose=False``\\를 전달하여 상세 모드를 금지할 수 있습니다. 두 경우 모두, ``sys.argv``\\는 "
":func:`testmod`\\에 의해 검사되지 않습니다 (따라서 ``-v``\\를 전달하거나 그렇지 않아도 효과가 없습니다)."
#: ../../library/doctest.rst:180
msgid ""
"There is also a command line shortcut for running :func:`testmod`, see "
"section :ref:`doctest-cli`."
msgstr ":func:`testmod`\\를 실행하는 명령줄 바로 가기도 있습니다, :ref:`doctest-cli` 절을 참조하십시오."
#: ../../library/doctest.rst:183
msgid ""
"For more information on :func:`testmod`, see section :ref:`doctest-basic-"
"api`."
msgstr ":func:`testmod`\\에 대한 자세한 내용은, :ref:`doctest-basic-api` 절을 참조하십시오."
#: ../../library/doctest.rst:189
msgid "Simple Usage: Checking Examples in a Text File"
msgstr "간단한 사용법: 텍스트 파일에 있는 예제 확인하기"
#: ../../library/doctest.rst:191
msgid ""
"Another simple application of doctest is testing interactive examples in "
"a text file. This can be done with the :func:`testfile` function::"
msgstr ""
"doctest의 또 다른 간단한 활용은 텍스트 파일에 있는 대화형 예제를 테스트하는 것입니다. 이것은 :func:`testfile`"
" 함수로 수행할 수 있습니다::"
#: ../../library/doctest.rst:194
msgid ""
"import doctest\n"
"doctest.testfile(\"example.txt\")"
msgstr ""
"import doctest\n"
"doctest.testfile(\"example.txt\")"
#: ../../library/doctest.rst:197
msgid ""
"That short script executes and verifies any interactive Python examples "
"contained in the file :file:`example.txt`. The file content is treated "
"as if it were a single giant docstring; the file doesn't need to contain "
"a Python program! For example, perhaps :file:`example.txt` contains "
"this:"
msgstr ""
"이 짧은 스크립트는 :file:`example.txt` 파일에 들어있는 대화형 파이썬 예제를 실행하고 검증합니다. 파일 내용은 "
"하나의 거대한 독스트링인 것처럼 취급됩니다; 파일이 파이썬 프로그램일 필요가 없습니다! 예를 들어, "
":file:`example.txt`\\에 다음과 같은 것이 들어있습니다:"
#: ../../library/doctest.rst:202
msgid ""
"The ``example`` module\n"
"======================\n"
"\n"
"Using ``factorial``\n"
"-------------------\n"
"\n"
"This is an example text file in reStructuredText format. First import\n"
"``factorial`` from the ``example`` module:\n"
"\n"
" >>> from example import factorial\n"
"\n"
"Now use it:\n"
"\n"
" >>> factorial(6)\n"
" 120"
msgstr ""
"The ``example`` module\n"
"======================\n"
"\n"
"Using ``factorial``\n"
"-------------------\n"
"\n"
"This is an example text file in reStructuredText format. First import\n"
"``factorial`` from the ``example`` module:\n"
"\n"
" >>> from example import factorial\n"
"\n"
"Now use it:\n"
"\n"
" >>> factorial(6)\n"
" 120"
#: ../../library/doctest.rst:220
msgid ""
"Running ``doctest.testfile(\"example.txt\")`` then finds the error in "
"this documentation::"
msgstr "``doctest.testfile(\"example.txt\")``\\를 실행하면 이 문서에 있는 에러를 찾습니다::"
#: ../../library/doctest.rst:223
msgid ""
"File \"./example.txt\", line 14, in example.txt\n"
"Failed example:\n"
" factorial(6)\n"
"Expected:\n"
" 120\n"
"Got:\n"
" 720"
msgstr ""
"File \"./example.txt\", line 14, in example.txt\n"
"Failed example:\n"
" factorial(6)\n"
"Expected:\n"
" 120\n"
"Got:\n"
" 720"
#: ../../library/doctest.rst:231
#, fuzzy
msgid ""
"As with :func:`testmod`, :func:`testfile` won't display anything unless "
"an example fails. If an example does fail, then the failing example(s) "
"and the cause(s) of the failure(s) are printed to stdout, using the same "
"format as :func:`!testmod`."
msgstr ""
":func:`testmod`\\와 마찬가지로, :func:`testfile`\\은 예제가 실패하지 않는 한 아무것도 표시하지 "
"않습니다. 예제가 실패하면, 실패한 예제와 실패 원인이 :func:`testmod`\\와 같은 형식을 사용하여 stdout에 "
"인쇄됩니다."
#: ../../library/doctest.rst:236
msgid ""
"By default, :func:`testfile` looks for files in the calling module's "
"directory. See section :ref:`doctest-basic-api` for a description of the "
"optional arguments that can be used to tell it to look for files in other"
" locations."
msgstr ""
"기본적으로, :func:`testfile`\\은 호출하는 모듈의 디렉터리에서 파일을 찾습니다. 다른 위치에서 파일을 찾도록 지시하는"
" 데 사용할 수 있는 선택적 인자에 대한 설명은 :ref:`doctest-basic-api` 절을 참조하십시오."
#: ../../library/doctest.rst:240
msgid ""
"Like :func:`testmod`, :func:`testfile`'s verbosity can be set with the "
"``-v`` command-line switch or with the optional keyword argument "
"*verbose*."
msgstr ""
":func:`testmod`\\와 마찬가지로, :func:`testfile`\\의 상세도는 ``-v`` 명령 줄 스위치나 선택적 "
"키워드 인자 *verbose*\\를 사용하여 설정할 수 있습니다."
#: ../../library/doctest.rst:244
msgid ""
"There is also a command line shortcut for running :func:`testfile`, see "
"section :ref:`doctest-cli`."
msgstr ":func:`testfile`\\을 실행하는 명령줄 바로 가기도 있습니다, :ref:`doctest-cli` 절을 참조하십시오."
#: ../../library/doctest.rst:247
msgid ""
"For more information on :func:`testfile`, see section :ref:`doctest-"
"basic-api`."
msgstr ":func:`testfile`\\에 대한 자세한 내용은, :ref:`doctest-basic-api` 절을 참조하십시오."
#: ../../library/doctest.rst:253
msgid "Command-line Usage"
msgstr "명령줄 사용법"
#: ../../library/doctest.rst:255
msgid ""
"The :mod:`doctest` module can be invoked as a script from the command "
"line:"
msgstr ""
#: ../../library/doctest.rst:257
msgid "python -m doctest [-v] [-o OPTION] [-f] file [file ...]"
msgstr "python -m doctest [-v] [-o OPTION] [-f] file [file ...]"
#: ../../library/doctest.rst:265
msgid ""
"Detailed report of all examples tried is printed to standard output, "
"along with assorted summaries at the end::"
msgstr "시도한 모든 예제에 대한 자세한 보고서가 표준 출력으로 출력되고, 끝에 정돈된 요약이 붙습니다::"
#: ../../library/doctest.rst:268
msgid "python -m doctest -v example.py"
msgstr "python -m doctest -v example.py"
#: ../../library/doctest.rst:270
msgid ""
"This will import :file:`example.py` as a standalone module and run "
":func:`testmod` on it. Note that this may not work correctly if the file "
"is part of a package and imports other submodules from that package."
msgstr ""
"이렇게 하면 :file:`example.py`\\를 독립 실행형 모듈로 임포트하고, :func:`testmod`\\를 실행합니다. "
"파일이 패키지 일부이고 그 패키지에서 다른 서브 모듈을 임포트하면, 올바르게 작동하지 않을 수 있음에 유의하십시오."
#: ../../library/doctest.rst:274
msgid ""
"If the file name does not end with :file:`.py`, :mod:`!doctest` infers "
"that it must be run with :func:`testfile` instead::"
msgstr ""
"파일 이름이 :file:`.py`\\로 끝나지 않으면, :mod:`!doctest`\\는 대신 :func:`testfile`\\로 "
"실행되어야 한다고 추론합니다::"
#: ../../library/doctest.rst:277
msgid "python -m doctest -v example.txt"
msgstr "python -m doctest -v example.txt"
#: ../../library/doctest.rst:281
msgid ""
"Option flags control various aspects of doctest's behavior, see section "
":ref:`doctest-options`."
msgstr ""
#: ../../library/doctest.rst:288
msgid "This is shorthand for ``-o FAIL_FAST``."
msgstr "``-o FAIL_FAST``\\의 축약입니다."
#: ../../library/doctest.rst:296
msgid "How It Works"
msgstr "작동 방법"
#: ../../library/doctest.rst:298
msgid ""
"This section examines in detail how doctest works: which docstrings it "
"looks at, how it finds interactive examples, what execution context it "
"uses, how it handles exceptions, and how option flags can be used to "
"control its behavior. This is the information that you need to know to "
"write doctest examples; for information about actually running doctest on"
" these examples, see the following sections."
msgstr ""
"이 절에서는 doctest가 어떻게 작동하는지 자세히 설명합니다: 어떤 독스트링을 살피는지, 대화형 예제를 어떻게 찾는지, 사용하는"
" 실행 컨텍스트는 무엇인지, 예외를 어떻게 처리하는지, 어떻게 옵션 플래그를 사용하여 동작을 제어하는지. 이것은 doctest "
"예제를 작성하기 위해 알아야 할 정보입니다; 이러한 예제에 대해 실제로 doctest를 실행하는 방법에 대한 자세한 내용은 다음 "
"절을 참조하십시오."
#: ../../library/doctest.rst:309
msgid "Which Docstrings Are Examined?"
msgstr "어떤 독스트링을 검사합니까?"
#: ../../library/doctest.rst:311
msgid ""
"The module docstring, and all function, class and method docstrings are "
"searched. Objects imported into the module are not searched."
msgstr "모듈 독스트링과 모든 함수, 클래스 및 메서드 독스트링이 검색됩니다. 모듈로 임포트 된 객체는 검색되지 않습니다."
#: ../../library/doctest.rst:321
msgid ""
"In addition, there are cases when you want tests to be part of a module "
"but not part of the help text, which requires that the tests not be "
"included in the docstring. Doctest looks for a module-level variable "
"called ``__test__`` and uses it to locate other tests. If ``M.__test__`` "
"exists, it must be a dict, and each entry maps a (string) name to a "
"function object, class object, or string. Function and class object "
"docstrings found from ``M.__test__`` are searched, and strings are "
"treated as if they were docstrings. In output, a key ``K`` in "
"``M.__test__`` appears with name ``M.__test__.K``."
msgstr ""
"또한, 테스트를 모듈의 일부로 포함시키고 싶지만 도움말 텍스트에는 포함시키고 싶지 않은 경우가 있습니다. 이 경우 테스트가 "
"독스트링에 포함되지 않도록 해야 합니다. Doctest는 모듈 수준 변수인 ``__test__``\\를 보고 이를 통해 다른 "
"테스트를 찾아냅니다. ``M.__test__``\\가 존재하면, 딕셔너리이어야 하고 각 항목은 (문자열) 이름을 함수 객체, 클래스"
" 객체 또는 문자열에 매핑합니다. ``M.__test__``\\에서 발견된 함수와 클래스 객체 독스트링이 검색되고, 문자열은 "
"독스트링인 것처럼 처리됩니다. 출력에서, ``M.__test__``\\의 키 ``K``\\가 이름 "
"``M.__test__.K``\\로 나타납니다."
#: ../../library/doctest.rst:330
msgid "For example, place this block of code at the top of :file:`example.py`:"
msgstr ""
#: ../../library/doctest.rst:332
#, python-brace-format
msgid ""
"__test__ = {\n"
" 'numbers': \"\"\"\n"
">>> factorial(6)\n"
"720\n"
"\n"
">>> [factorial(n) for n in range(6)]\n"
"[1, 1, 2, 6, 24, 120]\n"
"\"\"\"\n"
"}"
msgstr ""
"__test__ = {\n"
" 'numbers': \"\"\"\n"
">>> factorial(6)\n"
"720\n"
"\n"
">>> [factorial(n) for n in range(6)]\n"
"[1, 1, 2, 6, 24, 120]\n"
"\"\"\"\n"
"}"
#: ../../library/doctest.rst:344
msgid ""
"The value of ``example.__test__[\"numbers\"]`` will be treated as a "
"docstring and all the tests inside it will be run. It is important to "
"note that the value can be mapped to a function, class object, or module;"
" if so, :mod:`!doctest` searches them recursively for docstrings, which "
"are then scanned for tests."
msgstr ""
#: ../../library/doctest.rst:350
msgid ""
"Any classes found are recursively searched similarly, to test docstrings "
"in their contained methods and nested classes."
msgstr "발견된 모든 클래스는 포함된 메서드와 중첩된 클래스의 독스트링을 테스트하기 위해 유사하게 재귀적으로 검색됩니다."
#: ../../library/doctest.rst:355
msgid ""
"``doctest`` can only automatically discover classes and functions that "
"are defined at the module level or inside other classes."
msgstr ""
#: ../../library/doctest.rst:358
msgid ""
"Since nested classes and functions only exist when an outer function is "
"called, they cannot be discovered. Define them outside to make them "
"visible."
msgstr ""
#: ../../library/doctest.rst:364
msgid "How are Docstring Examples Recognized?"
msgstr "독스트링 예제는 어떻게 인식됩니까?"
#: ../../library/doctest.rst:366
msgid ""
"In most cases a copy-and-paste of an interactive console session works "
"fine, but doctest isn't trying to do an exact emulation of any specific "
"Python shell."
msgstr ""
"대부분 대화형 콘솔 세션의 복사하여 붙여넣기가 잘 작동하지만, doctest는 특정 파이썬 셸의 정확한 에뮬레이션을 시도하지 "
"않습니다."
#: ../../library/doctest.rst:371
msgid ""
">>> # comments are ignored\n"
">>> x = 12\n"
">>> x\n"
"12\n"
">>> if x == 13:\n"
"... print(\"yes\")\n"
"... else:\n"
"... print(\"no\")\n"
"... print(\"NO\")\n"
"... print(\"NO!!!\")\n"
"...\n"
"no\n"
"NO\n"
"NO!!!\n"
">>>"
msgstr ""
">>> # 주석은 무시됩니다\n"
">>> x = 12\n"
">>> x\n"
"12\n"
">>> if x == 13:\n"
"... print(\"yes\")\n"
"... else:\n"
"... print(\"no\")\n"
"... print(\"NO\")\n"
"... print(\"NO!!!\")\n"
"...\n"
"no\n"
"NO\n"
"NO!!!\n"
">>>"
#: ../../library/doctest.rst:391
msgid ""
"Any expected output must immediately follow the final ``'>>> '`` or "
"``'... '`` line containing the code, and the expected output (if any) "
"extends to the next ``'>>> '`` or all-whitespace line."
msgstr ""
"모든 예상 출력은 코드가 포함된 마지막 ``'>>> '`` 또는 ``'... '`` 줄 바로 다음에 나와야 하며, (있다면) 예상 "
"출력은 다음 ``'>>> '`` 나 전체 공백 줄까지 확장됩니다."
#: ../../library/doctest.rst:395
msgid "The fine print:"
msgstr "세부 사항:"
#: ../../library/doctest.rst:397
msgid ""
"Expected output cannot contain an all-whitespace line, since such a line "
"is taken to signal the end of expected output. If expected output does "
"contain a blank line, put ``<BLANKLINE>`` in your doctest example each "
"place a blank line is expected."
msgstr ""
"예상 출력은 전체 공백 줄을 포함할 수 없습니다. 그러한 줄은 예상 출력의 끝으로 인식되기 때문입니다. 예상 출력이 빈 줄을 "
"포함하면, doctest 예제에서 빈 줄이 나타나는 곳에 ``<BLANKLINE>``\\을 넣으십시오."
#: ../../library/doctest.rst:402
msgid ""
"All hard tab characters are expanded to spaces, using 8-column tab stops."
" Tabs in output generated by the tested code are not modified. Because "
"any hard tabs in the sample output *are* expanded, this means that if the"
" code output includes hard tabs, the only way the doctest can pass is if "
"the :const:`NORMALIZE_WHITESPACE` option or :ref:`directive <doctest-"
"directives>` is in effect. Alternatively, the test can be rewritten to "
"capture the output and compare it to an expected value as part of the "
"test. This handling of tabs in the source was arrived at through trial "
"and error, and has proven to be the least error prone way of handling "
"them. It is possible to use a different algorithm for handling tabs by "
"writing a custom :class:`DocTestParser` class."
msgstr ""
"모든 하드 탭 문자는 8열 탭 정지를 사용하여 스페이스로 확장됩니다. 테스트 된 코드에 의해 생성된 출력의 탭은 수정되지 않습니다."
" 샘플 출력의 모든 하드 탭이 *확장되므로*, 이것은 코드 출력에 하드 탭이 포함될 때 doctest가 통과할 수 있는 유일한 "
"방법은, :const:`NORMALIZE_WHITESPACE` 옵션이나 :ref:`지시자 <doctest-"
"directives>`\\가 유효한 경우뿐임을 의미합니다. 또는, 출력을 캡처하여 테스트 일부로 예상값과 비교하도록 테스트를 다시 "
"작성할 수 있습니다. 이러한 소스의 탭 처리는 시행착오를 거쳐 얻어진 것이며, 가장 에러가 발생하지 않는 방법으로 입증되었습니다. "
"사용자 정의 :class:`DocTestParser` 클래스를 작성하여 탭 처리에 다른 알고리즘을 사용하는 것도 가능합니다."
#: ../../library/doctest.rst:414
msgid ""
"Output to stdout is captured, but not output to stderr (exception "
"tracebacks are captured via a different means)."
msgstr "stdout으로의 출력은 캡처되지만, stderr로의 출력은 그렇지 않습니다 (예외 트레이스백은 다른 수단을 통해 캡처됩니다)."
#: ../../library/doctest.rst:417
msgid ""
"If you continue a line via backslashing in an interactive session, or for"
" any other reason use a backslash, you should use a raw docstring, which "
"will preserve your backslashes exactly as you type them::"
msgstr ""
"대화식 세션에서 역 슬래시를 통해 줄을 계속하거나, 다른 이유로 백 슬래시를 사용하면, 날 독스트링(raw docstring)을 "
"사용해서 역 슬래시를 입력한 그대로 유지해야 합니다::"
#: ../../library/doctest.rst:421
msgid ""
">>> def f(x):\n"
"... r'''Backslashes in a raw docstring: m\\n'''\n"
"...\n"
">>> print(f.__doc__)\n"
"Backslashes in a raw docstring: m\\n"
msgstr ""
">>> def f(x):\n"
"... r'''Backslashes in a raw docstring: m\\n'''\n"
"...\n"
">>> print(f.__doc__)\n"
"Backslashes in a raw docstring: m\\n"
#: ../../library/doctest.rst:427
msgid ""
"Otherwise, the backslash will be interpreted as part of the string. For "
"example, the ``\\n`` above would be interpreted as a newline character. "
"Alternatively, you can double each backslash in the doctest version (and "
"not use a raw string)::"
msgstr ""
"그렇지 않으면, 백 슬래시가 문자열 일부로 해석됩니다. 예를 들어, 위의 ``\\n``\\은 개행 문자로 해석됩니다. 또는, "
"doctest 버전에서 각 백 슬래시를 중복시킬 수 있습니다 (그리고 날 문자열은 사용하지 않습니다)::"
#: ../../library/doctest.rst:431
msgid ""
">>> def f(x):\n"
"... '''Backslashes in a raw docstring: m\\\\n'''\n"
"...\n"
">>> print(f.__doc__)\n"
"Backslashes in a raw docstring: m\\n"
msgstr ""
">>> def f(x):\n"
"... '''Backslashes in a raw docstring: m\\\\n'''\n"
"...\n"
">>> print(f.__doc__)\n"
"Backslashes in a raw docstring: m\\n"
#: ../../library/doctest.rst:437
msgid "The starting column doesn't matter::"
msgstr "시작 열은 중요하지 않습니다::"
#: ../../library/doctest.rst:439
msgid ""
">>> assert \"Easy!\"\n"
" >>> import math\n"
" >>> math.floor(1.9)\n"
" 1"
msgstr ""
">>> assert \"Easy!\"\n"
" >>> import math\n"
" >>> math.floor(1.9)\n"
" 1"
#: ../../library/doctest.rst:444
msgid ""
"and as many leading whitespace characters are stripped from the expected "
"output as appeared in the initial ``'>>> '`` line that started the "
"example."
msgstr "그리고 예제를 시작한 초기 ``'>>> '`` 줄에 나타나는 것만큼의 선행 공백을 예상 출력에서 제거합니다."
#: ../../library/doctest.rst:451
msgid "What's the Execution Context?"
msgstr "실행 컨텍스트란 무엇입니까?"
#: ../../library/doctest.rst:453
msgid ""
"By default, each time :mod:`doctest` finds a docstring to test, it uses a"
" *shallow copy* of :mod:`!M`'s globals, so that running tests doesn't "
"change the module's real globals, and so that one test in :mod:`!M` can't"
" leave behind crumbs that accidentally allow another test to work. This "
"means examples can freely use any names defined at top-level in "
":mod:`!M`, and names defined earlier in the docstring being run. Examples"
" cannot see names defined in other docstrings."
msgstr ""
"기본적으로, :mod:`doctest`\\가 테스트할 독스트링을 찾을 때마다, :mod:`!M`\\의 전역 이름 "
"공간(globals)의 *앝은 복사*\\를 사용하므로, 실행 중인 테스트는 모듈의 실제 전역을 변경하지 않고, "
":mod:`!M`\\의 한 테스트가 실수로 다른 테스트가 작동하도록 만드는 부스러기를 남기지 않습니다. 이는 예제가 "
":mod:`!M`\\에서 최상위 수준에 정의된 이름과 실행 중인 독스트링에서 앞서 정의한 이름을 자유롭게 사용할 수 있음을 "
"의미합니다. 예제는 다른 독스트링에 정의된 이름을 볼 수 없습니다."
#: ../../library/doctest.rst:461
msgid ""
"You can force use of your own dict as the execution context by passing "
"``globs=your_dict`` to :func:`testmod` or :func:`testfile` instead."
msgstr ""
"대신 ``globs=your_dict``\\를 :func:`testmod`\\나 :func:`testfile`\\로 전달하여 실행 "
"컨텍스트로 여러분 자신의 딕셔너리를 사용하도록 할 수 있습니다."
#: ../../library/doctest.rst:468
msgid "What About Exceptions?"
msgstr "예외는 어떻게 됩니까?"
#: ../../library/doctest.rst:470
msgid ""
"No problem, provided that the traceback is the only output produced by "
"the example: just paste in the traceback. [#]_ Since tracebacks contain "
"details that are likely to change rapidly (for example, exact file paths "
"and line numbers), this is one case where doctest works hard to be "
"flexible in what it accepts."
msgstr ""
"문제없습니다, 트레이스백이 예제에 의해 생성된 유일한 출력이기만 하면 됩니다: 그냥 트레이스백을 붙여넣으십시오. [#]_ "
"트레이스백에는 빠르게 변할 가능성이 있는 세부 사항(예를 들어, 정확한 파일 경로와 줄 번호)이 포함되어 있으므로, 이것은 "
"doctest가 수락할 내용에 유연하도록 신경 써야 하는 한 가지 사례입니다."
#: ../../library/doctest.rst:476
msgid "Simple example::"
msgstr "간단한 예::"
#: ../../library/doctest.rst:478
msgid ""
">>> [1, 2, 3].remove(42)\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"ValueError: list.remove(x): x not in list"
msgstr ""
">>> [1, 2, 3].remove(42)\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"ValueError: list.remove(x): x not in list"
#: ../../library/doctest.rst:483
msgid ""
"That doctest succeeds if :exc:`ValueError` is raised, with the "
"``list.remove(x): x not in list`` detail as shown."
msgstr ""
"이 doctest는 ``list.remove(x): x not in list`` 세부 정보를 포함하는 "
":exc:`ValueError`\\가 발생하면 성공합니다."
#: ../../library/doctest.rst:486
msgid ""
"The expected output for an exception must start with a traceback header, "
"which may be either of the following two lines, indented the same as the "
"first line of the example::"
msgstr "예외의 예상 출력은 다음 두 줄 중 한 가지가 예제의 첫 번째 줄과 같게 들여쓰기 된 트레이스백 헤더로 시작해야 합니다::"
#: ../../library/doctest.rst:490
msgid ""
"Traceback (most recent call last):\n"
"Traceback (innermost last):"
msgstr ""
"Traceback (most recent call last):\n"
"Traceback (innermost last):"
#: ../../library/doctest.rst:493
msgid ""
"The traceback header is followed by an optional traceback stack, whose "
"contents are ignored by doctest. The traceback stack is typically "
"omitted, or copied verbatim from an interactive session."
msgstr ""
"트레이스백 헤더 다음에는 선택적인 트레이스백 스택이 오며, 그 내용은 doctest가 무시합니다. 보통 트레이스백 스택은 "
"생략되거나, 대화형 세션에서 그대로 복사됩니다."
#: ../../library/doctest.rst:497
msgid ""
"The traceback stack is followed by the most interesting part: the line(s)"
" containing the exception type and detail. This is usually the last line"
" of a traceback, but can extend across multiple lines if the exception "
"has a multi-line detail::"
msgstr ""
"트레이스백 스택 다음에는 가장 흥미로운 부분이 옵니다: 예외 형과 세부 사항이 있는 줄. 대개 이것은 트레이스백의 마지막 줄이지만,"
" 예외에 여러 줄로 구성된 세부 사항이 있으면 여러 줄로 확장될 수 있습니다::"
#: ../../library/doctest.rst:502
msgid ""
">>> raise ValueError('multi\\n line\\ndetail')\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"ValueError: multi\n"
" line\n"
"detail"
msgstr ""
">>> raise ValueError('multi\\n line\\ndetail')\n"
"Traceback (most recent call last):\n"
" File \"<stdin>\", line 1, in <module>\n"
"ValueError: multi\n"
" line\n"
"detail"
#: ../../library/doctest.rst:509
msgid ""
"The last three lines (starting with :exc:`ValueError`) are compared "
"against the exception's type and detail, and the rest are ignored."
msgstr "(:exc:`ValueError`\\로 시작하는) 마지막 세 줄이 예외의 형 및 세부 사항과 비교되고, 나머지는 무시됩니다."
#: ../../library/doctest.rst:512
msgid ""
"Best practice is to omit the traceback stack, unless it adds significant "
"documentation value to the example. So the last example is probably "
"better as::"
msgstr ""
"모범 사례는 예제에 중요한 설명으로서의 가치를 추가하지 않는 한 트레이스백 스택을 생략하는 것입니다. 따라서 마지막 예제는 이렇게 "
"하는 것이 더 좋습니다::"
#: ../../library/doctest.rst:515
msgid ""
">>> raise ValueError('multi\\n line\\ndetail')\n"
"Traceback (most recent call last):\n"
" ...\n"
"ValueError: multi\n"
" line\n"
"detail"
msgstr ""
">>> raise ValueError('multi\\n line\\ndetail')\n"
"Traceback (most recent call last):\n"
" ...\n"
"ValueError: multi\n"
" line\n"
"detail"
#: ../../library/doctest.rst:522
msgid ""
"Note that tracebacks are treated very specially. In particular, in the "
"rewritten example, the use of ``...`` is independent of doctest's "
":const:`ELLIPSIS` option. The ellipsis in that example could be left "
"out, or could just as well be three (or three hundred) commas or digits, "
"or an indented transcript of a Monty Python skit."
msgstr ""
"트레이스백이 매우 특별하게 취급된다는 점에 유의하십시오. 특히, 다시 작성된 예제에서, ``...``\\의 사용은 doctest의 "
":const:`ELLIPSIS` 옵션과 무관합니다. 이 예제의 줄임표는 생략하거나, 3개(혹은 300개)의 쉼표나 숫자 또는 몬티 "
"파이썬 쇼의 들여쓰기 된 대본이어도 똑같이 잘 동작합니다."
#: ../../library/doctest.rst:528
msgid "Some details you should read once, but won't need to remember:"
msgstr "한 번쯤 읽어야 할 세부 정보이지만, 기억할 필요는 없습니다:"
#: ../../library/doctest.rst:530
msgid ""
"Doctest can't guess whether your expected output came from an exception "
"traceback or from ordinary printing. So, e.g., an example that expects "
"``ValueError: 42 is prime`` will pass whether :exc:`ValueError` is "
"actually raised or if the example merely prints that traceback text. In "
"practice, ordinary output rarely begins with a traceback header line, so "
"this doesn't create real problems."
msgstr ""
"Doctest는 예상 출력이 예외 트레이스백에서 온 것인지 일반 인쇄에서 온 것인지 추측할 수 없습니다. 그래서, 예를 들어, "
"``ValueError: 42 is prime``\\을 예상하는 예제는 :exc:`ValueError`\\가 실제로 발생해도 "
"통과하지만, 예제가 단지 그 트레이스백 텍스트를 출력해도 통과합니다. 실제로는, 일반 출력은 거의 트레이스백 헤더 줄로 시작하지 "
"않으므로, 실제 문제가 되지는 않습니다."
#: ../../library/doctest.rst:537
msgid ""