Skip to content

Add unit tests for pyamber replace_print and AtomicInteger #4793

Closed

Description

@Yicong-Huang

Task Summary

Two thin utilities in amber/src/main/python/core/util/ have no dedicated specs:

  • console_message/replace_print.py::replace_print — context manager that replaces builtins.print so prints inside the with block enqueue a ConsoleMessage on a buffer.
  • thread/atomic.py::AtomicInteger — thread-safe integer with inc / dec / get-and-* / property accessors.

Add unit tests covering the entry/exit lifecycle and buffer payloads of replace_print, plus the read/write/atomic-fetch semantics of AtomicInteger.

Task Type

  • Testing / QA

Activity

  1. added theissue type on May 3, 2026
  2. added a commit that references this issue on May 3, 2026
    ced3448
  3. added a commit that references this issue on Jun 22, 2026
    1e60f8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions