Diving In

We'll cover the following...

Like it or not, bugs happen. Despite your best efforts to write comprehensive unit tests, bugs happen. What do I mean by “bug”? A bug is a test case you haven’t written yet.

Press + to interact
import roman7
print (roman7.from_roman('')) #①
#0

① This is a bug. An empty string should raise an InvalidRomanNumeralError exception, just like any other sequence of characters that don’t represent a valid Roman numeral.

After reproducing the bug, and before fixing it, you should write a test case that fails, thus ... ...

Access this course and 1400+ top-rated courses and projects.