You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: This is an exercise for the Forking Workflow chapter of the RayWenderlich Mastering Git Book
In 85ca623 a feature was added to allow divisors other than 3 and 5 to be used for Fizz and Buzz. However, this feature does not work since the parameters added to the method signature were not actually used anywhere in the code.
In the following block of code lines 6 and 8 were the ones that were added. However, lines 11 and 12 were never updated to actually use these new parameters. The 3 in line 11 should have been updated to use fizz_divisor and the 5 in line 12 should have been updated to use buzz_divisor.
I receive the following output if I run the tests via python test_fizzbuzz.py. Instead of printing Fizz for 7, Buzz for 11 and FizzBuzz for 77 it just prints the numbers:
test_divisible_by_both (__main__.TestFizzBuzz) ... ok
test_divisible_by_five (__main__.TestFizzBuzz) ... ok
test_divisible_by_none (__main__.TestFizzBuzz) ... ok
test_divisible_by_three (__main__.TestFizzBuzz) ... ok
test_with_alternate_divisors (__main__.TestFizzBuzz) ... test_with_alternate_words (__main__.TestFizzBuzz) ... ok
======================================================================
FAIL: test_with_alternate_divisors (__main__.TestFizzBuzz) [Alternate Divisors: Divisible by First]
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_fizzbuzz.py", line 41, in test_with_alternate_divisors
self.assertEqual(fizzbuzz_for_num(7, fizz_divisor=7, buzz_divisor=11), "Fizz")
AssertionError: '7' != 'Fizz'
- 7
+ Fizz
======================================================================
FAIL: test_with_alternate_divisors (__main__.TestFizzBuzz) [Alternate Divisors: Divisible by Second]
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_fizzbuzz.py", line 43, in test_with_alternate_divisors
self.assertEqual(fizzbuzz_for_num(11, fizz_divisor=7, buzz_divisor=11), "Buzz")
AssertionError: '11' != 'Buzz'
- 11
+ Buzz
======================================================================
FAIL: test_with_alternate_divisors (__main__.TestFizzBuzz) [Alternate Divisors: Divisible by Both]
----------------------------------------------------------------------
Traceback (most recent call last):
File "./test_fizzbuzz.py", line 45, in test_with_alternate_divisors
self.assertEqual(fizzbuzz_for_num(77, fizz_divisor=7, buzz_divisor=11), "FizzBuzz")
AssertionError: '77' != 'FizzBuzz'
- 77
+ FizzBuzz
----------------------------------------------------------------------
Ran 6 tests in 0.001s
FAILED (failures=3)
Can someone submit a pull request to fix this issue?
The text was updated successfully, but these errors were encountered:
Note: This is an exercise for the Forking Workflow chapter of the RayWenderlich Mastering Git Book
In 85ca623 a feature was added to allow divisors other than 3 and 5 to be used for Fizz and Buzz. However, this feature does not work since the parameters added to the method signature were not actually used anywhere in the code.
In the following block of code lines 6 and 8 were the ones that were added. However, lines 11 and 12 were never updated to actually use these new parameters. The
3
in line 11 should have been updated to usefizz_divisor
and the5
in line 12 should have been updated to usebuzz_divisor
.https://github.com/raywenderlich/git-book-fizzbuzz/blob/85ca623d39b416a78fe97d61a27cfa46b8a4755e/fizzbuzz.py#L4-L13
The following test was added as part of the same commit but it looks like the test may not have been run since it is currently failing.
https://github.com/raywenderlich/git-book-fizzbuzz/blob/85ca623d39b416a78fe97d61a27cfa46b8a4755e/test_fizzbuzz.py#L37-L45
I receive the following output if I run the tests via
python test_fizzbuzz.py
. Instead of printing Fizz for 7, Buzz for 11 and FizzBuzz for 77 it just prints the numbers:Can someone submit a pull request to fix this issue?
The text was updated successfully, but these errors were encountered: