Running the examples in this book

The code examples in this book have been written for Python 3.4. They use some syntax that is not available in older versions of Python. Therefore, there are a few places we will need to change the code if we want to run the examples in, say, Python 2.6.

Note

The entire source code with all the changes below is available online at https://github.com/siddhi/test_driven_python. Get this code if you would like to run the example code in this book under Python 2.6, 2.7, 3.0, 3.1, 3.2, or 3.3

The following changes are required:

  • Enum: The Enum library is not in the standard library with older Python versions. It has been backported and can be installed from PyPi. Install the Enum34 library to use this feature.
  • set syntax: ...

Get Test-Driven Python Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.