Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tests e cobertura de código #43

@leogregianin

Description

@leogregianin

Seria interessante no readme ter uma seção com explicações como rodar os testes?
No requirements-dev.txt poderia ter somente as libs relativas a isso, por exemplo: lint, coverage.
Eu usei o coverage para rodar os testes e o relatório de cobertura de testes, como segue abaixo.

$ coverage run -m unittest && coverage report -m
.......................
----------------------------------------------------------------------
Ran 23 tests in 18.528s

OK
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
tests/__init__.py                       1      0   100%
tests/test_all.py                      26     14    46%   15-28, 32-33
tests/test_certidao.py                 14      0   100%
tests/test_cnh.py                      18      0   100%
tests/test_cnpj.py                     14      0   100%
tests/test_cns.py                      14      0   100%
tests/test_cpf.py                      21      0   100%
tests/test_generic.py                  24      0   100%
tests/test_pis.py                      18      0   100%
tests/test_renavam.py                  18      0   100%
tests/test_titulo_eleitor.py           19      0   100%
validate_docbr/BaseDoc.py              32      6    81%   10, 18, 25, 35, 43, 54
validate_docbr/CNH.py                  45      1    98%   15
validate_docbr/CNPJ.py                 44      3    93%   17, 22, 26
validate_docbr/CNS.py                  76      4    95%   15, 103-105
validate_docbr/CPF.py                  42      2    95%   16, 21
validate_docbr/Certidao.py             38      3    92%   14, 19, 29
validate_docbr/PIS.py                  33      2    94%   15, 20
validate_docbr/RENAVAM.py              30      0   100%
validate_docbr/TituloEleitoral.py      49      2    96%   19, 24
validate_docbr/__init__.py             10      0   100%
validate_docbr/generic.py              10      0   100%
-----------------------------------------------------------------
TOTAL                                 596     37    94%

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions