Skip to content

Commit 11dd93d

Browse files
jcs-instructorgregorrieglernitsanavni4dsherwoodmander11
committed
- F 5 -> Buzz
Co-Authored-By: Gregor Riegler <rieglerg85@gmail.com> Co-Authored-By: Nitsan Avni <nitsanav@gmail.com> Co-Authored-By: Joel Silberman <42779942+jcs-instructor@users.noreply.github.com> Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com> Co-Authored-By: Matt <matthew.anderson11@gmail.com>
1 parent c635540 commit 11dd93d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

katas/fizzbuzz/test_fizzbuzz.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,24 @@ def test_buzz_divisor_is_5(fizzbuzz_db):
5555
# todo: move this production code to another file later:
5656
def make_fizzbuzz(db) -> FizzbuzzFn:
5757
def fizzbuzz_fn(number):
58+
# TODO: get the rule from the db for 5
59+
if number == 5:
60+
return "Buzz"
5861
return "Fizz"
5962
return fizzbuzz_fn
63+
64+
6065
# ----------------------------------------------------------
6166

6267
def test_fizzbuzz(fizzbuzz_db):
6368
fizzbuzz_fn = make_fizzbuzz(fizzbuzz_db)
64-
assert "Fizz" == fizzbuzz_fn(3)
69+
assert "Fizz" == fizzbuzz_fn(3)
70+
71+
def test_buzz(fizzbuzz_db):
72+
fizzbuzz_fn = make_fizzbuzz(fizzbuzz_db)
73+
assert "Buzz" == fizzbuzz_fn(5)
74+
75+
def skip_test_15(fizzbuzz_db):
76+
fizzbuzz_fn = make_fizzbuzz(fizzbuzz_db)
77+
assert "FizzBuzz" == fizzbuzz_fn(15)
78+

0 commit comments

Comments
 (0)