Skip to content

Commit aadf2fd

Browse files
restore function multiply; fixes #2
1 parent 69ce84d commit aadf2fd

6 files changed

Lines changed: 15 additions & 12 deletions

File tree

.coverage

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
2.17 KB
Binary file not shown.

coverage.xml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
<?xml version="1.0" ?>
2-
<coverage version="7.7.1" timestamp="1743047027886" lines-valid="16" lines-covered="14" line-rate="0.875" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
2+
<coverage version="7.7.1" timestamp="1743048031240" lines-valid="19" lines-covered="19" line-rate="1" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
33
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.7.1 -->
44
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
55
<sources>
66
<source>C:\Users\KIMHON\Source\Repos\example-ci</source>
77
</sources>
88
<packages>
9-
<package name="." line-rate="0.875" branch-rate="0" complexity="0">
9+
<package name="." line-rate="1" branch-rate="0" complexity="0">
1010
<classes>
11-
<class name="functions.py" filename="functions.py" complexity="0" line-rate="0.75" branch-rate="0">
11+
<class name="functions.py" filename="functions.py" complexity="0" line-rate="1" branch-rate="0">
1212
<methods/>
1313
<lines>
1414
<line number="1" hits="1"/>
1515
<line number="2" hits="1"/>
1616
<line number="4" hits="1"/>
1717
<line number="5" hits="1"/>
1818
<line number="7" hits="1"/>
19-
<line number="8" hits="0"/>
19+
<line number="8" hits="1"/>
2020
<line number="10" hits="1"/>
21-
<line number="11" hits="0"/>
21+
<line number="11" hits="1"/>
2222
</lines>
2323
</class>
2424
<class name="test_functions.py" filename="test_functions.py" complexity="0" line-rate="1" branch-rate="0">
@@ -30,8 +30,11 @@
3030
<line number="5" hits="1"/>
3131
<line number="6" hits="1"/>
3232
<line number="7" hits="1"/>
33-
<line number="10" hits="1"/>
3433
<line number="11" hits="1"/>
34+
<line number="12" hits="1"/>
35+
<line number="16" hits="1"/>
36+
<line number="17" hits="1"/>
37+
<line number="18" hits="1"/>
3538
</lines>
3639
</class>
3740
</classes>

functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ def multiply(a, b):
88
return a * b
99

1010
def convert_fahrenheit_to_celsius(fahrenheit):
11-
return multiply(subtract(fahrenheit, 32), 9 / 5) # <-- Fix this in step 7
11+
return multiply(subtract(fahrenheit, 32), 5 / 9) # <-- Fix this in step 7

test_functions.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ def test_add():
66
assert add(2, 3) == 5
77
assert add('space', 'ship') == 'spaceship'
88

9+
910
# uncomment the following test in step 5
1011
def test_subtract():
1112
assert subtract(2, 3) == -1
1213

14+
1315
# uncomment the following test in step 11
14-
# def test_convert_fahrenheit_to_celsius():
15-
# assert f2c(32) == 0
16-
# assert f2c(122) == pytest.approx(50)
17-
# with pytest.raises(AssertionError):
18-
# f2c(-600)
16+
def test_convert_fahrenheit_to_celsius():
17+
assert f2c(32) == 0
18+
assert f2c(122) == pytest.approx(50)

0 commit comments

Comments
 (0)