Skip to content

Commit a60f2f4

Browse files
. F remove contains functionality from fizzbuzz function
Co-Authored-By: Joel Silberman <42779942+jcs-instructor@users.noreply.github.com> Co-Authored-By: 4dsherwood <4dsherwood@users.noreply.github.com>
1 parent f05f8a6 commit a60f2f4

File tree

4 files changed

+2
-1
lines changed

4 files changed

+2
-1
lines changed
-84 Bytes
Binary file not shown.
Binary file not shown.

katas/fizzbuzz_with_db_2/fizzbuzz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def fizz_buzz(i, rules=None):
2424
# rules = default_rules_from_db
2525
output = []
2626
for rule in rules:
27-
if i % rule.divisor == 0 or str(rule.divisor) in str(i):
27+
if i % rule.divisor == 0: # Later: if we want contains functionality, add: or str(rule.divisor) in str(i)
2828
output.append(rule.word)
2929
return ''.join(output) if output else str(i)
3030

katas/fizzbuzz_with_db_2/test_fizzbuzz.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def fizz_buzz_default(num):
1313
@pytest.mark.parametrize("input, expected", [
1414
(1, "1"),
1515
(2, "2"),
16+
(13, "13"),
1617
])
1718
def test_return_number(input, expected):
1819
assert fizz_buzz_default(input) == expected

0 commit comments

Comments
 (0)