Skip to content

Commit 103f694

Browse files
committed
Fix example count and pin tests to Python 3.13
README claimed 104 examples; the catalog has 109. `make test` ran bare python3, which fails on any system where python3 is not 3.13 (the example loader executes 3.12+ `type` statements). Route it through `uv run --python 3.13` and point the README at `make test`. https://claude.ai/code/session_012cj8czQW6Cd1Gw2PPgapED
1 parent e04e8d2 commit 103f694

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: test embed-examples build check-generated fingerprint browser-layout-test seo-cache-lint verify-examples check-registry-integrity check-confusable-pairs check-broad-surface-tours check-footgun-coverage check-notes-supported score-example-criteria check-quality-scores check-no-figure-rationales check-journey-outcomes quality-checks rubric-audit format-examples verify-python-version verify smoke-deployment dev deploy lint
22

33
test:
4-
python3 -m unittest discover -s tests -v
4+
uv run --python 3.13 python -m unittest discover -s tests -v
55

66
embed-examples:
77
scripts/embed_example_sources.py

‎README.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Production: <https://www.pythonbyexample.dev> (`workers.dev` remains enabled as
66

77
## Features
88

9-
- 104 curated Python 3.13 examples in learning order
9+
- 109 curated Python 3.13 examples in learning order
1010
- Literate source/output cells for each example walkthrough
1111
- Editable complete examples powered by CodeMirror
1212
- Read-only syntax highlighting powered by Shiki
@@ -60,9 +60,11 @@ This project is developed with red-green-refactor TDD:
6060
Install dependencies with `uv`, then run:
6161

6262
```bash
63-
python3 -m unittest discover -s tests -v
63+
make test
6464
```
6565

66+
The test suite (and the example loader it imports) requires Python 3.13; `make test` runs it through `uv run --python 3.13` so a system `python3` on another version still works.
67+
6668
After cloning, install the local git hooks once so merges and rebases regenerate `src/asset_manifest.py` instead of producing conflicts:
6769

6870
```bash

0 commit comments

Comments
 (0)