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
As described in StackOverflow I have simple WebApp that I am testing with WebTest but the coverage result report missed lines that are executed. This might be related to #117
My test file is very simple:
class FunctionalTests(unittest.TestCase):
def setUp(self):
from test_app import main
app = main({})
from webtest import TestApp
self.testapp = TestApp(app)
def test_not_found(self):
self.testapp.get("/not_found", status=404)
The view code is:
@notfound_view_config(renderer="../templates/404.jinja2")
def notfound_view(request):
request.response.status = 404 # This is line 6
return {} # This is line 7
The coverage result is:
Name Stmts Miss Branch BrPart Cover Missing
test_app/views/notfound.py 4 2 0 0 50% 6-7
But those lines are executed
Im using python3 with:
This is pytest version 5.4.1, imported from /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest/__init__.py
setuptools registered plugins:
celery-4.4.2 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/celery/contrib/pytest.py
pytest-pyramid-server-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_pyramid_server.py
pytest-shutil-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_shutil/workspace.py
pytest-cov-2.8.1 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_cov/plugin.py
pytest-webdriver-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_webdriver.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/httpd.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/jenkins.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/mongo.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/postgres.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/redis.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/rethink.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/s3.py
pytest-server-fixtures-1.7.0 at /home/cquiros/data/projects2017/personal/software/env_formshare/lib/python3.6/site-packages/pytest_server_fixtures/xvfb.py
The text was updated successfully, but these errors were encountered:
As described in StackOverflow I have simple WebApp that I am testing with WebTest but the coverage result report missed lines that are executed. This might be related to #117
My test file is very simple:
The view code is:
The coverage result is:
But those lines are executed
Im using python3 with:
The text was updated successfully, but these errors were encountered: