frlp-utn-ingsoft / orderingg

Aplicación utilizada en la cursada 2018 de Ingenieria de Software. UTN-FRLP
4 stars 20 forks source link

Coverage - Al ejecutarse #82

Closed Alexissiminkowich closed 6 years ago

Alexissiminkowich commented 6 years ago

Al ejecutar coverage con el comando: coverage run --source=app --branch -m pytest test/test_unit.py

Me sale lo siguiente:

Equipo@Equipo-PC MINGW32 ~/Desktop/ING DE SOFTWARE/orderingg (dev) $ coverage run --source=app --branch -m pytest test/test_unit.py ============================= test session starts ============================= platform win32 -- Python 3.4.0, pytest-3.5.1, py-1.5.3, pluggy-0.6.0 rootdir: C:\Users\Equipo\Desktop\ING DE SOFTWARE\orderingg, inifile: collected 0 items / 1 errors

=================================== ERRORS ==================================== _ ERROR collecting test/test_unit.py __ C:\Python34\lib\site-packages_pytest\python.py:412: in _importtestmodule mod = self.fspath.pyimport(ensuresyspath=importmode) C:\Python34\lib\site-packages\py_path\local.py:668: in pyimport import(modname)

:2214: in _find_and_load ??? :2203: in _find_and_load_unlocked ??? :1191: in _load_unlocked ??? :1161: in _load_backward_compatible ??? C:\Python34\lib\site-packages\_pytest\assertion\rewrite.py:213: in load_module py.builtin.exec_(co, mod.__dict__) test\test_unit.py:7: in from app import create_app, db app\__init__.py:8: in from app.routes import rest app\routes.py:4: in from app.models import Product, Order, OrderProduct E File "C:\Users\Equipo\Desktop\ING DE SOFTWARE\orderingg\app\models.py", line 18 E return '{}'.format(self.name) E ^ E IndentationError: expected an indented block !!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!! =========================== 1 error in 8.95 seconds =========================== Me faltaria instalar algo? No entiendo esos errores
RodrigoJacznik commented 6 years ago

En la línea 18 de models.py tenes un error de indentacion.

Alexissiminkowich commented 6 years ago

Listo, lo arregle!

Ahora al ejecutar el Coverage me muestra asi:

Equipo@Equipo-PC MINGW32 ~/Desktop/ING DE SOFTWARE/orderingg (dev) $ coverage run --source=app --branch -m pytest test/test_unit.py ============================= test session starts ============================= platform win32 -- Python 3.4.0, pytest-3.5.1, py-1.5.3, pluggy-0.6.0 rootdir: C:\Users\Equipo\Desktop\ING DE SOFTWARE\orderingg, inifile: collected 4 items

test\test_unit.py .... [100%]

========================== 4 passed in 9.86 seconds ===========================

RodrigoJacznik commented 6 years ago

Esta bien, te falta ejecutar el report

Alexissiminkowich commented 6 years ago

Al ejecutar el reporte:

$ coverage report Name Stmts Miss Branch BrPart Cover

app__init__.py 14 0 0 0 100% app\models.py 31 4 4 0 77% app\routes.py 55 30 24 3 41%

TOTAL 100 34 28 3 57%

RodrigoJacznik commented 6 years ago

Esta bien, es la salida esperada