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:
- Delete that
import pytest statement
pytest again to verify that the tests still pass.
- Commit and push the code.
This will be, hopefully, a straightforward exercise in using your editor and git. If not, happy Googling.
- 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.)
- 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.