small medium large xlarge

The latest version of the book is P1.0, released 2 months ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (21-Nov-17)
#82283
Paper page: 13
"use the --maxfail option to specify how many failures are okay with you." If I specify --maxfail=1 it stops at the first failure (just like -x). T...more...
  • Reported in: P1.0 (21-Sep-17)
#82094
PDF page: 15

In the first paragraph after the example, filenames "test\_two.py" and "test\_one.py" shouldn't have backslashes in them.--Tim Bell

  • Reported in: P1.0 (13-Sep-17)
#82067
PDF page: 24-25
There are two related issues, one of which is an outright error. Note that I am using the sample files downloaded today from the tar file. 1. The b...more...
  • Reported in: B5.0 (04-Sep-17)
#82015
PDF page: 30
def list_tasks(owner=None): # type: (str|None) -> list of Task would be better as either: def list_tasks(owner=None): # type: (str|None) -> list o...more...
  • Reported in: P1.0 (15-Sep-17)
#82075
PDF page: 30
It would be good to cover import pytest with pytest.raises(SystemExit) as ...: ... This is needed if the program you are tes...more...
  • Reported in: B5.0 (04-Sep-17)
#82016
PDF page: 31
Change @pytest.mark.smoke def test_list_raises(): """list() should raise an exception with wrong type param.""" with pytest.raises(TypeError): ta...more...
  • Reported in: P1.0 (16-Sep-17)
#82080
PDF page: 31
""" To add a smoke test suite to the Tasks project, we can add @mark.pytest.smoke to some of the tests. Let’s add it to a couple of tests in test_api...more...
  • Reported in: B5.0 (04-Sep-17)
#82017
PDF page: 32
If the page 31 typo/suggestion is taken (to change 'test_list_raises' to 'test_list_tasks_raises'), then the two references on this page should also b...more...
  • Reported in: B5.0 (04-Sep-17)
#82020
PDF page: 46

"""We can use the same data or multiple tests."""
should be
"""We can use the same data for multiple tests."""
--Charles Coggins

  • Reported in: P1.0 (08-Oct-17)
#82127
PDF page: 47

"To add a smoke test suite to the Tasks project, we can add @mark.pytest.smoke to some of the tests"

The above should say @pytest.mark.smoke.

  • Reported in: P1.0 (31-Oct-17)
#82194
PDF page: 51

Next, let’s rework some our tests for tasks_proj to properly use fixtures.

It should be: [...] some OF our tests [...]--Karol Babioch

  • Reported in: B6.0 (08-Sep-17)
#82036
PDF page: 61
Change "usefixtures takes a string that is composed of a comma-separated list of fixtures to use." to "usefixtures takes a comma separated list of ...more...
  • Reported in: B6.0 (08-Sep-17)
#82037
PDF page: 63
The sentence: "Here, lue is now the fixture name, instead of fixture_with_a_name_much_longer_than_lue." should be changed to: "Here, lue is now the...more...
  • Reported in: B6.0 (08-Sep-17)
#82038
PDF page: 63
The test run output is incorrect. The line: "test_rename_fixture.py::test_everything_2 (fixtures used: lue)." should be changed to: "test_rename_fi...more...
  • Reported in: B6.0 (08-Sep-17)
#82039
PDF page: 74
Consider changing the variable name in this line: "file = tmpdir_factory.mktemp('data').join('author_file.json')" You could use 'file_' or anything ...more...
  • Reported in: P1.0 (10-Oct-17)
#82137
PDF page: 80

At: "You can pass in --clear-cache to clear the cache before the session."

The right argument is "--cache-clear".--Paulo Fernando Cruz Romeira

  • Reported in: P1.0 (21-Sep-17)
#82095
Paper page: 88
"This little function uses the regular expression module function re.sub to replace ~ with our new temporary directory." - code (book and src) uses re...more...
  • Reported in: P1.0 (19-Oct-17)
#82162
PDF page: 134
The first sentence says: "Let’s pause and install version 3 of Tasks:" but then the following code snippet has "$ pip install -e ch7/tasks_proj_v2" --...more...
  • Reported in: P1.0 (19-Oct-17)
#82163
PDF page: 135
In the text (in various places on this page), the function "tasks_db()" is mentioned. However, the code defines "_tasks_db()": the text is missing the...more...
  • Reported in: P1.0 (19-Oct-17)
#82164
PDF page: 136

The inline code in the second-last line on the page has 'tasks_db' instead of '_tasks_db': the leading underscore is missing.
--Tim Bell