Skip to content

Setup dev test framework #2

@jmcpheron

Description

@jmcpheron

I’d like to set up some lightweight testing for this project—nothing fancy, just a quick way to make sure the basics work and we’re not flying blind.

Simon Willison recommends starting super simple with pytest. No boilerplate, just a file like this:

tests/test_basics.py

def test_one_plus_one():
assert 1 + 1 == 2

That’s enough to make sure pytest runs and we have a framework in place. From there we can build on it as the project grows.

Tasks:

[ ] Add pytest to requirements-dev.txt or pyproject.toml

[ ] Create tests/ folder with a basic test like the one above

[ ] Confirm you can run pytest and see a passing test

Optional extras later might include:

Snapshot testing with syrupy

Markdown doc tests (Simon has a plugin for this too)

Just want a little safety net in place, and this feels like a nice low-friction starting point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions