Why are unittest2 methods camelCase if names_with_underscores are preferred? Why are unittest2 methods camelCase if names_with_underscores are preferred? python python

Why are unittest2 methods camelCase if names_with_underscores are preferred?


From unittest2 website:

unittest2 is a backport of the new features added to the unittest testing framework in Python 2.7. It is tested to run on Python 2.4 - 2.7.

To use unittest2 instead of unittest simply replace import unittest with import unittest2.

Its a bit confusing as from a version 2 is not expected to be a backport, but a new major release with (probably) new features. Anyway, the main idea is creating a backport where all the user has to do is changing the import statement. For this they could not change their method signatures

Also, from unittest website:

The Python unit testing framework, sometimes referred to as “PyUnit,” is a Python language version of JUnit, by Kent Beck and Erich Gamma. JUnit is, in turn, a Java version of Kent’s Smalltalk testing framework. Each is the de facto standard unit testing framework for its respective language.

So this explains the whole resemblance between the frameworks and probably the camel case notation