From 2dc840aca1e4b1f607fb8a7beacd9c51f2edb4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bryan=20Garc=C3=ADa?= Date: Thu, 16 Jun 2022 00:47:44 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9E=20Fixes=20test=20bugs=20-=20Th?= =?UTF-8?q?e=20exercise=2017=20test=20was=20looking=20for=20the=20executio?= =?UTF-8?q?n=20of=20the=20function=20when=20it=20actually=20should=20be=20?= =?UTF-8?q?looking=20for=20the=20existence=20of=20it=20-=20Exercise=2012?= =?UTF-8?q?=20was=20looking=20for=20execution=20without=20and=20space=20th?= =?UTF-8?q?at=20is=20most=20common=20and=20readable=20if=20it=20is=20writt?= =?UTF-8?q?en=20with=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exercises/12-Rand-From-One-to-Twelve/test.py | 2 +- exercises/17-Russian-Roulette/test.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/12-Rand-From-One-to-Twelve/test.py b/exercises/12-Rand-From-One-to-Twelve/test.py index 5922659f..a8d91c13 100644 --- a/exercises/12-Rand-From-One-to-Twelve/test.py +++ b/exercises/12-Rand-From-One-to-Twelve/test.py @@ -22,7 +22,7 @@ def test_function_existence(app): def test_conditional(): with open(path, 'r') as content_file: content = content_file.read() - pattern = r"random\.randrange+\(1,13\)" + pattern = r"random\.randrange+\(1, 13\)" regex = re.compile(pattern) assert bool(regex.search(content)) == True diff --git a/exercises/17-Russian-Roulette/test.py b/exercises/17-Russian-Roulette/test.py index 647303c5..4abd6311 100644 --- a/exercises/17-Russian-Roulette/test.py +++ b/exercises/17-Russian-Roulette/test.py @@ -10,11 +10,11 @@ @pytest.mark.it('The function spin_chamber must exist') def test_function_spin_chamber(capsys, app): - assert app.spin_chamber() + assert app.spin_chamber @pytest.mark.it('The function fire_gun must exist') def test_function_fire_gun(capsys, app): - assert app.fire_gun() + assert app.fire_gun @pytest.mark.it('The function fire_gun should return the expected output in both cases') def test_function_output(capsys, app): From 1d6c9ff4f53e8bc7958069f3865fb7a017e90609 Mon Sep 17 00:00:00 2001 From: Tomas Gonzalez <56565994+tommygonzaleza@users.noreply.github.com> Date: Thu, 19 Jan 2023 17:07:46 -0400 Subject: [PATCH 2/2] Update test.py --- exercises/12-Rand-From-One-to-Twelve/test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/12-Rand-From-One-to-Twelve/test.py b/exercises/12-Rand-From-One-to-Twelve/test.py index a8d91c13..cd44cb42 100644 --- a/exercises/12-Rand-From-One-to-Twelve/test.py +++ b/exercises/12-Rand-From-One-to-Twelve/test.py @@ -22,7 +22,7 @@ def test_function_existence(app): def test_conditional(): with open(path, 'r') as content_file: content = content_file.read() - pattern = r"random\.randrange+\(1, 13\)" + pattern = r"random\.randrange+\(1,\s*13\)" regex = re.compile(pattern) assert bool(regex.search(content)) == True @@ -37,4 +37,4 @@ def test_function_called_for(): with open(path, 'r') as content_file: content = content_file.read() regex = re.compile(r"print\s*\(\s*get_randomInt\(\)\s*\)") - assert bool(regex.search(content)) == True \ No newline at end of file + assert bool(regex.search(content)) == True