Adiciona testes MC/DC para o método get_address_from_cep e cobre linha não testada apontada na issue #466#532
Merged
camilamaia merged 2 commits intobrazilian-utils:mainfrom Jun 16, 2025
gabriel-lima258:466
Merged
Adiciona testes MC/DC para o método get_address_from_cep e cobre linha não testada apontada na issue #466#532camilamaia merged 2 commits intobrazilian-utils:mainfrom gabriel-lima258:466
camilamaia merged 2 commits intobrazilian-utils:mainfrom
gabriel-lima258:466
Conversation
…alid and valid CEPs
…ng in TestGetAddressFromCEP_MC_DC
camilamaia
approved these changes
Jun 16, 2025
Member
camilamaia
left a comment
There was a problem hiding this comment.
Nu, que PR mais maravilhoso! Obrigada demais @gabriel-lima258 🙇♀️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descrição
Este Pull Request implementa testes adicionais para o método
get_address_from_cep, com foco na aplicação do critério MC/DC (Modified Condition/Decision Coverage). O objetivo é cobrir completamente todas as decisões e condições do método, incluindo a linha 172 do arquivocep.py, anteriormente não coberta, conforme apontado na issue #466.Mudanças Propostas
TestGetAddressFromCEP_MC_DC, simulando:{"erro": true}para cobrir a linha 172 (CT6)urlopeneloadspara simular corretamente o contexto da API ViaCEP.cep.py.Checklist de Revisão
Comentários Adicionais (opcional)
Os testes foram organizados para facilitar a rastreabilidade e podem servir de base para testes de MC/DC em outros métodos que contenham múltiplas condições compostas.
Issue Relacionada
Closes #466