Skip to content

fscheidt/software

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metodologias de Desenvolvimento

Configurar projeto python

  1. Clonar este repositório:
git clone https://github.com/fscheidt/software
  1. Instalar o ambiente virtual do python:
cd software
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
code .
  1. Executa somente os testes contidos em src/area:
pytest -v src/area

Slides

Test coverage

Instalar plugin pytest-cov

pip install pytest-cov

Avalia a cobertura do código (pasta src):

pytest --cov=. src/

OU

coverage run --source src/ -m pytest
coverage report -m

Relatório gerado:

plugins: cov-5.0.0
collected 6 items                                                        

---------- coverage: platform linux, python 3.10  ----------
Name                         Stmts   Miss  Cover
------------------------------------------------
src/area/geometria.py            3      0   100%
src/area/geometria_test.py       9      0   100%
src/npc/npc_player.py            6      0   100%
src/npc/npc_player_test.py       7      0   100%
------------------------------------------------
TOTAL                           25      0   100%

About

Metodologias de desenvolvimento

Topics

Resources

Stars

Watchers

Forks

Languages