Skip to content

Commit 456b36f

Browse files
authored
Merge pull request #330 from cs50/patch-refueling-pyc
Patch refueling pyc
2 parents 98c1d3e + 410ced3 commit 456b36f

10 files changed

+9
-3
lines changed

tests/fuel/__init__.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
def exists():
77
"""test_fuel.py exist"""
88
check50.exists("test_fuel.py")
9-
9+
1010
# Include testing fuel.py
1111
check50.include("fuel.py")
1212

@@ -25,10 +25,16 @@ def test_convert():
2525

2626
@check50.check(test_correct)
2727
def test_value_error():
28-
"""test_fuel catches fuel.py not raising ValueError in convert"""
28+
"""test_fuel catches fuel.py not raising ValueError in convert (1/2)"""
2929
test_implementation("value_error_test", code=1)
3030

3131

32+
@check50.check(test_correct)
33+
def test_negative_fraction_error():
34+
"""test_fuel catches fuel.py not raising ValueError in convert (2/2)"""
35+
test_implementation("negative_fraction_test", code=1)
36+
37+
3238
@check50.check(test_correct)
3339
def test_zero_division_error():
3440
"""test_fuel catches fuel.py not raising ZeroDivisionError in convert"""
@@ -81,4 +87,4 @@ def test_implementation(filename, code=0):
8187
patch_file(f"{filename}")
8288

8389
# Expect that pytest will exit with given status code
84-
return check50.run("pytest test_fuel.py").exit(code=code)
90+
return check50.run("pytest test_fuel.py").exit(code=code)

tests/fuel/convert_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/correct_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/gauge_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/lower_bound_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/negative_fraction_test.pyc

1.24 KB
Binary file not shown.

tests/fuel/percent_gauge_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/upper_bound_test.pyc

33 Bytes
Binary file not shown.

tests/fuel/value_error_test.pyc

0 Bytes
Binary file not shown.
34 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)