small medium large xlarge

The latest version of the book is P1.0, released about 1 year ago. If you've bought a PDF of the book and would like to update 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)
  • Fixed: 31-Oct-18, awaiting book release
#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 (19-Dec-17)
  • Fixed: 31-Oct-18, awaiting book release
#82394
PDF page: 13

The section heading for maxfail only has one dash, should be two: this "–maxfail=num" should be: "--maxfail=num"--Jamie Czuy

  • Reported in: P1.0 (02-Nov-18)
#83850
PDF page: 14
In the case of using the Windows platform, I ran into several issues while trying out the given session. Must be created the folder for the databas...more...
  • Reported in: P1.0 (21-Sep-17)
  • Fixed: 01-Nov-18, awaiting book release
#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)
  • Fixed: 01-Nov-18, awaiting book release
#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: P1.0 (10-May-18)
  • Fixed: 01-Nov-18, awaiting book release
#83084
PDF page: 25
"Installing a Package Locally The test file, tests/test_task.py, contains ..." The partial path should be 'tests/unit/test_task.py' as per the hea...more...
  • Reported in: P1.0 (06-Mar-18)
  • Fixed: 01-Nov-18, awaiting book release
#82876
PDF page: 26
Final code snippet on this page has two "pip install" commands. The first says pip install ./tasks_proj/ The second says pip install --no-c...more...
  • Reported in: P1.0 (16-Sep-17)
  • Fixed: 02-Nov-18, awaiting book release
#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: P1.0 (18-Oct-18)
  • Fixed: 02-Nov-18, awaiting book release
#83787
Paper page: 32 34
In ch2 the name of the marker after -m option should be in double quotes not single quotes. Especially when combining markers e.g. 'smoke and get' ge...more...
  • Reported in: P1.0 (16-Oct-18)
  • Fixed: 02-Nov-18, awaiting book release
#83783
PDF page: 40
The tinydb package has replaced "eid" with "doc_id". This causes a Deprecation Warning when running the tests the involve tinydb, starting midway thr...more...
  • Reported in: P1.0 (08-May-18)
  • Fixed: 02-Nov-18, awaiting book release
#83071
PDF page: 44
Paper page: 29
The test file, tests/test_task.py, contains the tests we worked on in Running pytest, in files test_three.py and test_four.py. The correct path s...more...
  • Reported in: B5.0 (04-Sep-17)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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 (07-Jan-18)
  • Fixed: 02-Nov-18, awaiting book release
#82460
PDF page: 77

At the beginning of the 'using cache' section the phrase:
We want to make sure 'order' dependencies
Should be 'other'--Gabriele Bonetti

  • Reported in: P1.0 (10-Oct-17)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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 (20-Feb-18)
  • Fixed: 02-Nov-18, awaiting book release
#82790
Paper page: 114
In the book on pg. 114, the code snippets for pytest.ini, tox.ini and setup.cfg contain a line like this: > ... more options ... These lines are a...more...
  • Reported in: P1.0 (19-Oct-17)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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)
  • Fixed: 02-Nov-18, awaiting book release
#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