From 0c56c4b06f82a993d0b47f0aff29461fce902b43 Mon Sep 17 00:00:00 2001 From: ErnestoXG Date: Sun, 7 May 2023 23:43:10 +0000 Subject: [PATCH] changed test to accept both spanish and english output --- exercises/13-Create-A-For-Loop/test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exercises/13-Create-A-For-Loop/test.py b/exercises/13-Create-A-For-Loop/test.py index 42063b0f..bac75fb6 100644 --- a/exercises/13-Create-A-For-Loop/test.py +++ b/exercises/13-Create-A-For-Loop/test.py @@ -27,7 +27,11 @@ def test_for_loop(): def test_for_file_output(capsys): captured = buffer.getvalue() expected = ["I will write questions if I am stuck\n" for x in range(300)] - assert captured == "".join(expected) #add \n because the console jumps the line on every print + expected_2 = ["Escribiré preguntas si estoy atascado\n" for x in range(300)] + + hasCorrectAnswer = ((captured == "".join(expected)) or (captured == "".join(expected_2))) + + assert hasCorrectAnswer #add \n because the console jumps the line on every print @pytest.mark.it('Use the function print()') def test_for_print():