You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported byMarc Schlaich (Bitbucket: schlamar, GitHub: schlamar)
Coverage does not detect number of statements correctly in a multi line statement if it is not followed by a newline until Python 3.3. It works in Python 3.4.
#!text
$ cat cov_error.py
import subprocess
import sys
out, err = subprocess.Popen(
[sys.executable, '-c', 'pass'],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()
$ py -2.7 -m coverage run cov_error.py && py -2.7 -m coverage report
Name Stmts Miss Cover
-------------------------------
cov_error 6 0 100%
$ echo "" >> cov_error.py
$ py -2.7 -m coverage run cov_error.py && py -2.7 -m coverage report
Name Stmts Miss Cover
-------------------------------
cov_error 3 0 100%
$ # revert new line in editor
$ py -3.3 -m coverage run cov_error.py && py -3.3 -m coverage report
Name Stmts Miss Cover
-------------------------------
cov_error 6 0 100%
$ py -3.4 -m coverage run cov_error.py && py -3.4 -m coverage report
Name Stmts Miss Cover
-------------------------------
cov_error 3 0 100%
Originally reported by Marc Schlaich (Bitbucket: schlamar, GitHub: schlamar)
Coverage does not detect number of statements correctly in a multi line statement if it is not followed by a newline until Python 3.3. It works in Python 3.4.
The text was updated successfully, but these errors were encountered: