From aadf2fdc52c8be23fd79420e673a1be7923f4e97 Mon Sep 17 00:00:00 2001 From: 20115830 <20115830@tafe.wa.edu.au> Date: Thu, 27 Mar 2025 12:01:05 +0800 Subject: [PATCH] restore function multiply; fixes #2 --- .coverage | Bin 53248 -> 53248 bytes __pycache__/functions.cpython-313.pyc | Bin 689 -> 689 bytes ...est_functions.cpython-313-pytest-8.3.5.pyc | Bin 3313 -> 5530 bytes coverage.xml | 15 +++++++++------ functions.py | 2 +- test_functions.py | 10 +++++----- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.coverage b/.coverage index f6723686ab1e9c7f1a2bc567c31156b807ee3032..f5edf4e09be941aa9f6c02773bb08b695d4dbff9 100644 GIT binary patch delta 39 vcmZozz}&Eac>`Mm+dBsS@BHsJ3kp2qpZva`gNv7)k%f~}=$!=nq6rQF9<>b^ delta 38 ucmZozz}&Eac>`Mm+j|E7AN=n(3kp2upZu<$gOi1gk%f~};2qDR2@U`fi46My diff --git a/__pycache__/functions.cpython-313.pyc b/__pycache__/functions.cpython-313.pyc index 06f94e5babbefb91752a3c44769899fbb7aa9848..7f9a9cdcd576a25c61482054d6d911dce4c57b85 100644 GIT binary patch delta 31 mcmdnUx{;OZGcPX}0}y;avytl>BYTm|@j{v74<|ooJOu!rrVF_M delta 31 jcmdnUx{;OZGcPX}0}vFQ+{kr}k^Sr$5co6sIpZk+s9X(f diff --git a/__pycache__/test_functions.cpython-313-pytest-8.3.5.pyc b/__pycache__/test_functions.cpython-313-pytest-8.3.5.pyc index f0cceb22e343bf7a7c2a39ceb734f7a1c16cda43..2a5ec602aa613a606ac644920d702395d76d65a6 100644 GIT binary patch delta 1373 zcmb7EOHUI~6ux(+&uN*KMjCVhEr`xYsDTvuL6N#1{To(oxe9$m4}`MvCtIC;GXW!;um`FYm! zr_M>dFmpkvZ?^NVN@p0!53;9mNaMZf4!f( zC`yQGjNVhCDsr2Vv=JQ<)fT&$Du@ok(@g@@1i`der8-jM=T)^xD*6UvqDn%jj?ifh z@~0^<(601f?UK;l5Jr)yY}ASYFhj$l8lP7bB5!b;y6Pmz2iYyxq*ARE)r#o8q?fdt zqDNZ}rJ78Te(-C73;L7rQ1slO=p!lZ2iIRG!<6JQIzhA>ToR!%Uq-3s4Dv9E+L1+> zl;$g=8W zS;Age*ylinc^$GsBW8QYY@NoB=stFE|J;K_qhKU16DjW-ZF`YtdBAIyY~JpK4MB}v zuY-2eKVStyKS*Lw8}R4H34OKoSAz%?4N#K-^AYJ~#-Vxcl;nlA)#6<;2`T!KQ~R_p R{;t3;KgQi>9D`$e^>69JO>F=G delta 121 zcmbQG{ZW$dGcPX}0}%M0e3CBCG?7n&F=(QCFiSe4Cfmjq4sJ%S$-Ugmm^Aq(Uld8Q zxW$}ilzfY=pt2;jxTHuOsI5pJNUUTi(g3m5fW$2ho80`A(wtPgA`2jw5r~TwCg+OE Naed}uWRwRh1OUi!9vT1u diff --git a/coverage.xml b/coverage.xml index d98ecda..4a8b849 100644 --- a/coverage.xml +++ b/coverage.xml @@ -1,14 +1,14 @@ - + C:\Users\KIMHON\Source\Repos\example-ci - + - + @@ -16,9 +16,9 @@ - + - + @@ -30,8 +30,11 @@ - + + + + diff --git a/functions.py b/functions.py index 114cc6d..cf98cfb 100644 --- a/functions.py +++ b/functions.py @@ -8,4 +8,4 @@ def multiply(a, b): return a * b def convert_fahrenheit_to_celsius(fahrenheit): - return multiply(subtract(fahrenheit, 32), 9 / 5) # <-- Fix this in step 7 \ No newline at end of file + return multiply(subtract(fahrenheit, 32), 5 / 9) # <-- Fix this in step 7 \ No newline at end of file diff --git a/test_functions.py b/test_functions.py index 0e59f4a..c85e171 100644 --- a/test_functions.py +++ b/test_functions.py @@ -6,13 +6,13 @@ def test_add(): assert add(2, 3) == 5 assert add('space', 'ship') == 'spaceship' + # uncomment the following test in step 5 def test_subtract(): assert subtract(2, 3) == -1 + # uncomment the following test in step 11 -# def test_convert_fahrenheit_to_celsius(): -# assert f2c(32) == 0 -# assert f2c(122) == pytest.approx(50) -# with pytest.raises(AssertionError): -# f2c(-600) +def test_convert_fahrenheit_to_celsius(): + assert f2c(32) == 0 + assert f2c(122) == pytest.approx(50) \ No newline at end of file