Skip to content
Snippets Groups Projects
Commit c6fc6e77 authored by Boucas Marco's avatar Boucas Marco
Browse files

Fin de journée, on a bien travaillé. Il faut finir le test de la fonction avec l'input

parent 0ad4620a
No related branches found
No related tags found
1 merge request!2Fusion sur le master pour commencer contribution
from textual_2048 import *
from pytest import *
import mock
def test_read_player_command(monkeypatch):
monkeypatch.setattr('builtins.input', lambda x: "g")
reponse = read_player_command()
assert reponse == "g"
\ No newline at end of file
def read_player_command():
move = input("Entrez votre commande (g (gauche), d (droite), h (haut), b (bas)):")
return move
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment