Write tests. Write a README. Look back at how far you've come.
Day 80 of 80
Three tasks today. In order:
pytest and make them pass.Create tests/test_capstone.py. Aim for 5 tests minimum — more if you have time. Focus on the core behavior, not every edge case.
Ask yourself: What are the 5 things this tool absolutely must do correctly? Those are your tests. A few patterns to consider:
import pytest
# Import whatever your project needs here
class TestCoreFunctionality:
"""Tests for the core things your capstone must do."""
def test_main_thing_works(self):
"""The thing your tool is FOR — does it work?"""
# Arrange: set up what you need
# Act: call the thing
# Assert: check the result
pass
def test_invalid_input_raises_clear_error(self):
"""Bad input should fail with a meaningful error, not a crash."""
with pytest.raises(ValueError): # or whatever exception you raise
# call with bad input
pass
def test_data_round_trip(self, tmp_path):
"""Data should survive save and load."""
# Write something, load it back, compare
pass
def test_empty_case(self):
"""No data should return empty result, not raise an error."""
pass
def test_output_shape(self):
"""The main output has the right structure."""
pass
Run them: pytest tests/ -v
Create README.md in your project folder. Even if nobody else reads it, writing it forces you to think like a user instead of a builder.
# [Project Name]
One sentence: what does this do?
## What it does
2-3 bullet points. What problems does it solve?
## Setup
pip install -r requirements.txt
Set up your .env file:
ANTHROPIC_API_KEY=your-key-here
## Usage
[Your main commands with examples]
python dvp.py generate "Wide aerial over mountains" --save
python dvp.py batch shots.json --output results.json
## What I'd add next
If I had more time, I'd add:
- [thing 1]
- [thing 2]
Open your Week 1 exercise — shot_formatter.py or whichever was your first script. Read it.
That was Day 1. You wrote 7 lines of code and asked the user to type a shot description. The program printed it back formatted.
Now look at what you just built. You have:
That's not "learning Python." That's knowing Python.
pytest tests/ -v80 days. 16 weeks. One app that grew from 7 lines to a full-stack Python project with a database, API, CLI, tests, and async generation.
You're no longer someone who's "learning Python." You're someone who builds things with Python.
Now go build something real.