Testing
pytestRuns the whole suite against tests/ using dspy’s DummyLM in place of a real LM call. Tests that call the configured LM are marked live and skipped by default. Run them explicitly with:
pytest -m liveTo run live tests, you must configure a model in an .env file. The tests skip gracefully if API_KEY is not set.
Some standard pytest shorthands:
pytestto run all.pytest -vfor per-test names instead of dots.pytest tests/test_gold_examples.pyto run just one file.pytest -k tokenizeto run only tests matching a substring.pytest --collect-onlyif you just want to see what it discovered without running anything.