assertEquals vs. assertEqual in python

前端 未结 5 1741
北荒
北荒 2020-12-23 08:21

Is there a difference between assertEquals and assertEqual in the python unittest.TestCase?

And if there is not, why are there

5条回答
  •  天涯浪人
    2020-12-23 08:51

    A 3.3 update: From 26.3.7.1.1. Deprecated aliases :

    For historical reasons, some of the TestCase methods had one or more aliases that are now deprecated. The following table lists the correct names along with their deprecated aliases:

    Method Name   | Deprecated alias | Deprecated alias
    --------------+------------------+-----------------
    assertEqual() | failUnlessEqual  | assertEquals
    ...
    

提交回复
热议问题