From 5d2ba75460d272e87ba71a4152486a5b783e03b9 Mon Sep 17 00:00:00 2001 From: Cedric Verstege <cedric.verstege@cern.ch> Date: Thu, 27 Mar 2025 16:20:45 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=88=E2=80=8D=E2=AC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- case-2-test/test_wizard_calculator.py | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/case-2-test/test_wizard_calculator.py b/case-2-test/test_wizard_calculator.py index 5b31771..69b0af8 100644 --- a/case-2-test/test_wizard_calculator.py +++ b/case-2-test/test_wizard_calculator.py @@ -1,4 +1,4 @@ -import pytest, math, pytorch, numpy +import pytest from wizard_calculator import ( summon_dragons, @@ -21,21 +21,21 @@ def test_vanish_trolls(): assert vanish_trolls(10, 0) == 10 -# def test_brew_potions(): -# assert brew_potions(2, 3) == 6 -# assert brew_potions(-1, 3) == -3 -# assert brew_potions(0, 100) == 1 +def test_brew_potions(): + assert brew_potions(2, 3) == 6 + assert brew_potions(-1, 3) == -3 + assert brew_potions(0, 100) == 1 -# def test_cast_division_spell(): -# assert cast_division_spell(6, 3) == 2 -# assert cast_division_spell(10, 2) == 3 -# assert cast_division_spell(7, 7) == 1 -# with pytest.raises(ValueError): -# cast_division_spell(1, 0) +def test_cast_division_spell(): + assert cast_division_spell(6, 3) == 2 + assert cast_division_spell(10, 2) == 3 + assert cast_division_spell(7, 7) == 1 + with pytest.raises(ValueError): + cast_division_spell(1, 0) -# def test_conjure_magic_circle_area(): -# assert conjure_magic_circle_area(3) == pytest.approx(28.274, 0.001) -# assert conjure_magic_circle_area(0) == 0 -# assert conjure_magic_circle_area(1) == pytest.approx(3.14159, 0.001) +def test_conjure_magic_circle_area(): + assert conjure_magic_circle_area(3) == pytest.approx(28.274, 0.001) + assert conjure_magic_circle_area(0) == 0 + assert conjure_magic_circle_area(1) == pytest.approx(3.14159, 0.001) -- GitLab