@@ -1574,7 +1574,7 @@ msgstr ""
15741574msgid ""
15751575"Test that *first* is respectively >, >=, < or <= than *second* depending on "
15761576"the method name. If not, the test will fail::"
1577- msgstr ""
1577+ msgstr "根据方法名分别测试 *first* 是否 >, >=, < 或 <= *second*。 如果不是,则测试失败:: "
15781578
15791579#: ../../library/unittest.rst:1202
15801580msgid ""
@@ -1613,6 +1613,7 @@ msgid ""
16131613"regardless of their order. When they don't, an error message listing the "
16141614"differences between the sequences will be generated."
16151615msgstr ""
1616+ "测试序列 *first* 与 *second* 是否包含同样的元素,无论其顺序如何。 当存在差异时,将生成一条错误消息来列出两个序列之间的差异。"
16161617
16171618#: ../../library/unittest.rst:1226
16181619msgid ""
@@ -1621,6 +1622,9 @@ msgid ""
16211622"Equivalent to: ``assertEqual(Counter(list(first)), Counter(list(second)))`` "
16221623"but works with sequences of unhashable objects as well."
16231624msgstr ""
1625+ "重复的元素 *不会* 在 *first* 和 *second* 的比较中被忽略。 它会检查每个元素在两个序列中的出现次数是否相同。 等价于: "
1626+ "``assertEqual(Counter(list(first)), Counter(list(second)))`` "
1627+ "但还适用于包含不可哈希对象的序列。"
16241628
16251629#: ../../library/unittest.rst:1237
16261630msgid ""
@@ -1629,6 +1633,8 @@ msgid ""
16291633" implemented for most of the built-in types, but it's also possible to "
16301634"register new methods using :meth:`addTypeEqualityFunc`:"
16311635msgstr ""
1636+ ":meth:`assertEqual` 方法会将相同类型对象的相等性检查分派给不同的类型专属方法。 这些方法已被大多数内置类型所实现,但也可以使用 "
1637+ ":meth:`addTypeEqualityFunc` 来注册新的方法:"
16321638
16331639#: ../../library/unittest.rst:1244
16341640msgid ""
@@ -1640,6 +1646,10 @@ msgid ""
16401646"between the first two parameters is detected -- possibly providing useful "
16411647"information and explaining the inequalities in details in the error message."
16421648msgstr ""
1649+ "注册一个由 :meth:`assertEqual` 调用的特定类型专属方法来检查恰好为相同 *typeobj* (而非子类) 的两个对象是否相等。 "
1650+ "*function* 必须接受两个位置参数和第三个 msg=None 关键字参数,就像 :meth:`assertEqual` 那样。 "
1651+ "当检测到前两个形参之间不相等时它必须引发 :data:`self.failureException(msg) <failureException>` "
1652+ "-- 可能还会提供有用的信息并在错误消息中详细解释不相等的原因。"
16431653
16441654#: ../../library/unittest.rst:1255
16451655msgid ""
0 commit comments