From: Bernhard Konrad Date: Thu, 11 Apr 2013 02:08:46 +0000 (-0700) Subject: Update cheat-sheet.md X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e2a36d0010f5475b493b045748675b2067e6c58e;p=swc-testing-nose.git Update cheat-sheet.md minor layout changes --- diff --git a/testing/cheat-sheet.md b/testing/cheat-sheet.md index 825241e..990a047 100644 --- a/testing/cheat-sheet.md +++ b/testing/cheat-sheet.md @@ -4,10 +4,10 @@ Python Testing Cheat Sheet Why testing? ------------ -# Helps you to think about expected behavior, especially boundary cases, -# documents expected behavior, -# confidence recent changes didn't break anything that worked before, -# confidence code is correct. +1. Helps you to think about expected behavior, especially boundary cases, +2. documents expected behavior, +3. confidence recent changes didn't break anything that worked before, +4. confidence code is correct. Defensive programming @@ -85,8 +85,11 @@ Test-driven deveopment ---------------------- ***Red.*** Write test function that checks one new functionality you want to add to your code. -- tests have to fail. + ***Green.*** Write minimal code that implements desired features until all tests pass. + ***Refactor.*** Improve code wrt. readability and speed. Constantly check that tests still pass. + ***Commit.*** Commit working code to version control. Repeat.