What is a statement in coverage.py?
Stmts
is the number of total statements. For example, for the first line, 20 statements were executed, out of which 4 were missed, so 16 were covered:
16/20 = 0.8 (80%)
which matches the 80%
cover ratio in the table.
I realized that statements are the number of lines of code including imports, class and function definitions (not counting the comments).