Last active
May 4, 2019 22:46
-
-
Save brenorb/61907d096bfb1d1042b8342b01e339b2 to your computer and use it in GitHub Desktop.
Python TDD with pytest. https://pytest.org
This file contains 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
import twittter_main | |
# Execute Pytest in the cmd to assert the test. | |
def test_post_sem_usuario_sem_msg(): | |
assert twittter_main.post('->') == 'Comando invalido!' | |
def test_post_sem_msg(): | |
assert twittter_main.post("Alice ->") == "Post sem mensagem!" | |
def test_post_sem_usuario(): | |
assert twittter_main.post("-> Estamos no coding day") == "Post sem usuario!" | |
def test_post_sem_parametro(): | |
assert twittter_main.post() == "Post sem parametro" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment