Skip to content

[Clock] Review Test Cases and Discuss Structure and Objectives of Exercise #3012

Open

Description

@BethanyG

Filing this as a tracking issue and invitation to a discussion on revisions to this exercise.

The intent of Clock was to practice class customization and operator overloading via dunder methods in Python.
We've recently had quite a few changes, adding __repr__ to the mix, as well as additional instructions and tests in support of that change. A few issues have now come up around it:

  1. Issue [Clock] Proposal for additional tests #2926
  2. Issue [Clock] Improved/additional tests for __add__ and __sub__ #3008

It feels like this exercise is overloaded. It especially has too many tests, and is perhaps not clear enough in its directions and hints as to what the student does or does not need to think about for their implementations.

Thoughts on rework/adjustment clarification strategies welcome here.

Activity

  1. github-actions commented on Apr 17, 2022

    @github-actions
  2. pinned this issue on Apr 19, 2022
  3. deekshahavaragi commented on Dec 13, 2025

    @deekshahavaragi

    Hi

    While reviewing the current test cases for the Clock exercise, I noticed that
    there isn’t a very explicit example highlighting wraparound behavior across
    midnight (for example, 23:59 + 2 minutes → 00:01).

    Do you think adding a small, focused test case like this would help clarify
    the intended behavior for learners without increasing overall complexity?
    Happy to open a PR if this sounds reasonable.

    Thanks!

  4. BethanyG commented on Dec 14, 2025

    @BethanyG
    MemberAuthor

    Hi @deekshahavaragi 👋🏽

    Thanks for the comment and the offer of help! 🙂

    This is an exercises that pulls test data from a common repo that serves most language tracks on Exercism - not just the Python track. The tests you see here are auto-generated from that problem specification data via a script and a JinJa2 template.

    To add test cases for these types of exercises, we generally discuss them first on the forum and get buy in from at least three track maintainers. The PR then is made to the canonical data in the problem-specs repo, and not this Python content repo.

    So I would recommend opening an issue under the Exercism - Building Exercism category in the forum, similar to this thread, to discuss adding a test case 😄 . Many thanks!

    PS: That being said, the original problem as stated above is that this exercise already has too many test cases, and might need a rework in implementation, due to the amount of class-based customizations expected from students.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions