Exercises
The code files included in the code download for this chapter don’t have the fixes. They just have the broken code. Even if you plan to do most of your debugging with an IDE, I encourage you to try the debugging techniques in this chapter to help you understand how to use the flags and pdb commands.
-
Create a new virtual environment and install Cards in editable mode.
-
Run pytest and make sure you see the same failures listed in the chapter.
-
Use --lf and --lf -x to see how they work.
-
Try --stepwise and --stepwise-skip. Run them both a few times. How are they different than --lf and --lf -x?
-
Use --pdb to open pdb at a test failure.
-
Use --lf --trace to open pdb at the start of the first failing test.
-
Fix both bugs and verify with a clean ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access