-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alteração do nome dos métodos parse
para remove_symbols
#112
Conversation
tests/test_cnpj.py
Outdated
parse("12.345.678/0001-90") | ||
mock_sieve.assert_called() | ||
def test_remove_symbols(self): | ||
with patch("brutils.cnpj.remove_symbols") as mock_remove_symbols: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aqui você quer verificar se o sieve foi chamado, então o mock tem que ser do sieve e nao do proprio remove_symbols.
porque no teste, vc quer testar que ao chamar o remove_symbols, o sieve será chamado.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perfeito, Camila! Obrigada pela ajuda ❤️
Codecov Report
@@ Coverage Diff @@
## main #112 +/- ##
=======================================
Coverage 98.46% 98.46%
=======================================
Files 3 3
Lines 65 65
=======================================
Hits 64 64
Misses 1 1
|
closes #110 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quanto ao código, tá 💯. Arrasou!
A documentação que foi alterada é da versão 1.0.1, da versão antiga. A ideia seria a gente não mudar nada da versão anterior para não confundir quem já utiliza a biblioteca. Além disso, o método que foi renomeado foi o parse
e não o sieve
. Então o correto seria alterar a documentação nos READMEs (pt-br e en), mudando o parse
para remove_symbols
. Faz sentido?
Ah, aqui também daria para deixar o título e a descrição do PR um pouco mais explícitos. Por exemplo: Título Descrição
Ah, e sempre dá para editar as informações do PR depois |
parse
para remove_symbols
|
Co-authored-by: Camila Maia <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mazaaaahhhh🏅
cpf.parse
paracpf.remove_symbols
parse_cpf
pararemove_symbols_cpf
cnpj.parse
paracnpj.remove_symbols
parse_cnpj
pararemove_symbols_cnpj