Python task manager from scratch, part 11: First bugfix

Last time I introduced a small bug (unintentionally). The test file as it existed then began with import pytest. I typed this habitually, because I usually need to import pytest in files with tests in them (we'll see why).

But it's not necessary. pytest, the program I run from the command line, finds tests (when I run that program) and does its thing with them. Sometimes I want, separately, to use functions provided by pytest (the homonymous library)--but I'm not using any here.

If you don't quite grok that, you can choose to research it now or not, as you choose.

What we need to do is:

  1. Delete that import pytest statement
  2. Run pytest again to verify that the tests still pass.
  3. Commit and push the code.

This will be, hopefully, a straightforward exercise in using your editor and git. If not, happy Googling.

Related notes:

  1. One beautiful thing about modern version control is how it supports very small changes like this one. Organize your commits according to logical units of work, not some independent sense of how much code is comfortable to submit at once. Do your best to keep these units of work small. Splitting a change into many small ones has small disadvantages and huge advantages. (I could describe these, but they're readily absorbed by example, and tough to believe and understand if I simply state them in the abstract now.)
  2. I'm literally coding this project up from scratch, because it is a piece of software I literally want to write, as I write this guide. I'll definitely make more mistakes.

Here's the current commit of the veery repository.


Next post: Python task manager from scratch, part 12: A Task repository


Home page