This is a well known code Kata and it was implemented with TDD using unittest, Python's Unit Testing Framework, inspired by JUnit.
It's basically a robot which says:
- 'Fizz' when the given number is multiple of 3
- 'Buzz' when the given number is multiple of 5
- 'FizzBuzz' when the given number is multiple of 3 and 5
- the given number, if it isn't multiple of 3 and/or 5
$ python -m unittest
$ python
>>> from fizzbuzz import robot
>>> robot(1) # outputs: '1'
>>> robot(3) # outputs: 'Fizz'
>>> robot(5) # outputs: 'Buzz'
>>> robot(15) # outputs: 'FizzBuzz'