O'Reilly logo

Python Testing Beginner's Guide by Daniel Arbuckle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3

Pop quiz - understanding units

  1. units exist: __init__, method1 and method2.
  2. Both method1 and method2 assume the correct operation of __init__, and additionally method2 assumes the correct operation of method1.
  3. Tests for method2 would need to use a fake method1.

Pop quiz - unit testing during design

  1. The tests we're building now are the foundation of the whole development process. The choices we make here affect everything that comes after; it's important to do it right.
  2. If the people who write the specification aren't the same people who are writing the code, then it's important for the coders to start involving themselves as soon as possible, to keep the whole process within the bounds of what can usefully be done. If the specifiers are the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required