Skip to content

Add tests for blackboard._ago (the "5m ago" text on the agent wall) #59

Description

@ldbumble

blackboard._ago - the "just now / 5m ago / 3h ago / 2d ago" text on the agent wall (taskuary --board) - has no tests.

Where: taskuary/blackboard.py - def _ago(stamp): under a minute is just now, under 60 minutes Nm ago, under 48 hours Nh ago, then Nd ago; bad input returns ''.

Done when tests/test_blackboard.py covers:

  • the boundaries: 59 minutes, 60 minutes, 47 hours, 48 hours
  • a timestamp in the future
  • None, '' and a garbage string (all '')

Build the stamps with datetime.now() - timedelta(...). If a test shows odd behaviour (the future case, for instance), describe it in the PR - a fix is welcome but optional.


Getting started: pip install -e ".[dev]", then python -m pytest -q (offline, a few seconds). UI work: cd website && npm ci && npm test. See CONTRIBUTING.md. One small PR with the change and its test is perfect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions