(Using fabric/fabric as an example of a unittest style project with a complex, nontrivial test suite)
» find tests -type f -maxdepth 1 -mindepth 1 -name "*.py" | wc -l
18
» find tests -type f -maxdepth 1 -mindepth 1 -name "test_*.py" | wc -l
13
75% of the files in my tests
folder are tests, yet they must be named test_
.
» grep -inr "class " tests/test_* | wc -l
29
» grep -inr "class Test" tests/test_* | wc -l
23
80% of the classes in my tests
folder, in my files named test_*
, must be named Test*
.
» grep -inr "def " tests/test_* | wc -l
383
» grep -inr "def test_" tests/test_* | wc -l
285
75% of the functions or methods in my tests
folder, in my files named test_*
, most of which are inside classes named Test*
, must be named test_*
.
That is the problem with unittest.