1616# Makdon <[email protected] >, 20211717# Xiao Xu <[email protected] >, 20211818# helloworldSB <[email protected] >, 202119- # Freesand Leo <[email protected] >, 20212019# Siyuan Xu, 2021
20+ # Justin Chu <[email protected] >, 202121+ # Freesand Leo <[email protected] >, 20212122#
2223#, fuzzy
2324msgid ""
@@ -26,7 +27,7 @@ msgstr ""
2627"Report-Msgid-Bugs-To : \n "
2728"POT-Creation-Date : 2021-06-29 12:56+0000\n "
2829"PO-Revision-Date : 2021-06-28 01:16+0000\n "
29- "Last-Translator : Siyuan Xu , 2021\n "
30+ "
Last-Translator :
Freesand Leo <[email protected] > , 2021\n"
3031"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
3132"MIME-Version : 1.0\n "
3233"Content-Type : text/plain; charset=UTF-8\n "
@@ -183,9 +184,9 @@ msgid ""
183184" `AppVeyor <https://www.appveyor.com/>`_."
184185msgstr ""
185186"随 Python 源代码分发的脚本 :file:`Tools/unittestgui/unittestgui.py` "
186- "是一个一个用于发现和执行测试的用户图形界面工具。这为了极大地方便单元测试新手使用。建议在生产环境中测试应由一个持续集成系统来启动,如 "
187- "`Buildbot <https://buildbot.net/>`_, `Jenkins <https://jenkins.io/>`_ 或者 "
188- "`Travis-CI <https://travis-ci.com>`_, 或者 `AppVeyor "
187+ "是一个一个用于发现和执行测试的用户图形界面工具。这主要是为了方便新手使用单元测试制作的。在生产环境中,测试应由一个持续集成(CI)系统运行,如 "
188+ "`Buildbot <https://buildbot.net/>`_, `Jenkins <https://jenkins.io/>`_ "
189+ ", `Travis-CI <https://travis-ci.com>`_, 或 `AppVeyor "
189190"<https://www.appveyor.com/>`_。"
190191
191192#: ../../library/unittest.rst:82
@@ -606,9 +607,9 @@ msgid ""
606607" do the right thing and collect all the module's test cases for you and "
607608"execute them."
608609msgstr ""
609- "建议你根据所测试的功能,将测试用 TestCase 实现集合起来 。:mod:`unittest` 为此提供了机制: :dfn:`test suite`,以 "
610- " :mod:`unittest` 的类 :class:`TestSuite` 为代表。大部分情况下 ,调用 :func:`unittest.main` "
611- "即可,并且它会为你集合所有模块的测试用例并执行 。"
610+ "推荐你根据用例所测试的功能将测试用 TestCase 分组 。:mod:`unittest` 为此提供了 :dfn:`test "
611+ "suite`: :mod:`unittest` 的 :class:`TestSuite` 类是一个代表。通常情况下 ,调用 "
612+ ":func:`unittest.main` 就能正确地找到并执行这个模块下所有用 TestCase 分组的测试 。"
612613
613614#: ../../library/unittest.rst:428
614615msgid ""
@@ -699,6 +700,8 @@ msgid ""
699700"is not recommended. Taking the time to set up proper :class:`TestCase` "
700701"subclasses will make future test refactorings infinitely easier."
701702msgstr ""
703+ "用 :class:`FunctionTestCase` 可以快速将现有的测试转换成基于 :mod:`unittest` "
704+ "的测试,但不推荐你这样做。花点时间继承 :class:`TestCase` 会让以后重构测试无比轻松。"
702705
703706#: ../../library/unittest.rst:497
704707msgid ""
@@ -720,6 +723,8 @@ msgid ""
720723" a test that is broken and will fail, but shouldn't be counted as a failure "
721724"on a :class:`TestResult`."
722725msgstr ""
726+ "Unittest 支持跳过单个或整组的测试用例。它还支持把测试标注成“预期失败”的测试。这些坏测试会失败,但不会算进 "
727+ ":class:`TestResult` 的失败里。"
723728
724729#: ../../library/unittest.rst:515
725730msgid ""
@@ -762,7 +767,7 @@ msgstr ""
762767msgid ""
763768"The following decorators and exception implement test skipping and expected "
764769"failures:"
765- msgstr ""
770+ msgstr "以下的装饰器和异常实现了跳过测试和预期失败两种功能: "
766771
767772#: ../../library/unittest.rst:586
768773msgid ""
@@ -832,7 +837,7 @@ msgid ""
832837"Without using a subtest, execution would stop after the first failure, and "
833838"the error would be less easy to diagnose because the value of ``i`` wouldn't"
834839" be displayed::"
835- msgstr ""
840+ msgstr "如果不使用子测试,程序遇到第一次错误之后就会停止。而且因为``i``的值不显示,错误也更难找。 "
836841
837842#: ../../library/unittest.rst:681
838843msgid "Classes and functions"
@@ -880,7 +885,7 @@ msgstr ""
880885
881886#: ../../library/unittest.rst:715
882887msgid "Methods in the first group (running the test) are:"
883- msgstr ""
888+ msgstr "第一组(用于运行测试的)方法是: "
884889
885890#: ../../library/unittest.rst:719
886891msgid ""
@@ -1306,7 +1311,7 @@ msgstr "或者:"
13061311
13071312#: ../../library/unittest.rst:1017
13081313msgid "Added under the name ``assertRaisesRegexp``."
1309- msgstr ""
1314+ msgstr "以方法名``assertRaisesRegexp``添加。 "
13101315
13111316#: ../../library/unittest.rst:1020
13121317msgid "Renamed to :meth:`assertRaisesRegex`."
@@ -1546,13 +1551,13 @@ msgstr ""
15461551
15471552#: ../../library/unittest.rst:1229
15481553msgid "Added under the name ``assertRegexpMatches``."
1549- msgstr ""
1554+ msgstr "以方法名``assertRegexpMatches``添加。 "
15501555
15511556#: ../../library/unittest.rst:1231
15521557msgid ""
15531558"The method ``assertRegexpMatches()`` has been renamed to "
15541559":meth:`.assertRegex`."
1555- msgstr ""
1560+ msgstr "方法 ``assertRegexpMatches()`` 已被改名为 :meth:`.assertRegex`。 "
15561561
15571562#: ../../library/unittest.rst:1234
15581563msgid ":meth:`.assertNotRegex`."
@@ -1562,7 +1567,7 @@ msgstr ":meth:`.assertNotRegex`"
15621567msgid ""
15631568"The name ``assertNotRegexpMatches`` is a deprecated alias for "
15641569":meth:`.assertNotRegex`."
1565- msgstr ""
1570+ msgstr "``assertNotRegexpMatches`` 这个名字是 :meth:`.assertNotRegex` 的已被弃用的别名。 "
15661571
15671572#: ../../library/unittest.rst:1243
15681573msgid ""
@@ -1604,58 +1609,59 @@ msgid ""
16041609":meth:`~TestCase.assertEqual` are summarized in the following table. Note "
16051610"that it's usually not necessary to invoke these methods directly."
16061611msgstr ""
1612+ "以下是 :meth:`~TestCase.assertEqual` 自动选用的不同类型的比较方法。一般情况下不需要直接在测试中调用这些方法。"
16071613
16081614#: ../../library/unittest.rst:1281
16091615msgid "Used to compare"
1610- msgstr ""
1616+ msgstr "用作比较 "
16111617
16121618#: ../../library/unittest.rst:1283
16131619msgid ":meth:`assertMultiLineEqual(a, b) <TestCase.assertMultiLineEqual>`"
16141620msgstr ":meth:`assertMultiLineEqual(a, b) <TestCase.assertMultiLineEqual>`"
16151621
16161622#: ../../library/unittest.rst:1283
16171623msgid "strings"
1618- msgstr ""
1624+ msgstr "字符串 "
16191625
16201626#: ../../library/unittest.rst:1286
16211627msgid ":meth:`assertSequenceEqual(a, b) <TestCase.assertSequenceEqual>`"
16221628msgstr ":meth:`assertSequenceEqual(a, b) <TestCase.assertSequenceEqual>`"
16231629
16241630#: ../../library/unittest.rst:1286
16251631msgid "sequences"
1626- msgstr ""
1632+ msgstr "序列 "
16271633
16281634#: ../../library/unittest.rst:1289
16291635msgid ":meth:`assertListEqual(a, b) <TestCase.assertListEqual>`"
16301636msgstr ":meth:`assertListEqual(a, b) <TestCase.assertListEqual>`"
16311637
16321638#: ../../library/unittest.rst:1289
16331639msgid "lists"
1634- msgstr ""
1640+ msgstr "列表 "
16351641
16361642#: ../../library/unittest.rst:1292
16371643msgid ":meth:`assertTupleEqual(a, b) <TestCase.assertTupleEqual>`"
16381644msgstr ":meth:`assertTupleEqual(a, b) <TestCase.assertTupleEqual>`"
16391645
16401646#: ../../library/unittest.rst:1292
16411647msgid "tuples"
1642- msgstr ""
1648+ msgstr "元组 "
16431649
16441650#: ../../library/unittest.rst:1295
16451651msgid ":meth:`assertSetEqual(a, b) <TestCase.assertSetEqual>`"
16461652msgstr ":meth:`assertSetEqual(a, b) <TestCase.assertSetEqual>`"
16471653
16481654#: ../../library/unittest.rst:1295
16491655msgid "sets or frozensets"
1650- msgstr ""
1656+ msgstr "集合 "
16511657
16521658#: ../../library/unittest.rst:1298
16531659msgid ":meth:`assertDictEqual(a, b) <TestCase.assertDictEqual>`"
16541660msgstr ":meth:`assertDictEqual(a, b) <TestCase.assertDictEqual>`"
16551661
16561662#: ../../library/unittest.rst:1298
16571663msgid "dicts"
1658- msgstr ""
1664+ msgstr "字典 "
16591665
16601666#: ../../library/unittest.rst:1306
16611667msgid ""
0 commit comments