Skip to content

test: add unit tests for singleton decorator#98

Merged
openminddev merged 3 commits intoOpenMind:mainfrom
DasRasyo:DasRasyo-patch-1
Apr 28, 2026
Merged

test: add unit tests for singleton decorator#98
openminddev merged 3 commits intoOpenMind:mainfrom
DasRasyo:DasRasyo-patch-1

Conversation

@DasRasyo
Copy link
Copy Markdown
Contributor

Summary

  • Add unit tests for src/om1_utils/singleton/singleton.py which currently has no test coverage
  • 6 test cases covering instance reuse, init argument preservation, class isolation, thread safety, kwargs support, and attribute persistence

Test plan

  • All tests pass with pytest tests/om1_utils/singleton/test_singleton.py -v
  • No impact on existing tests

DasRasyo and others added 3 commits February 21, 2026 00:24
Remove the unused 'threading' import from tests/om1_utils/singleton/test_singleton.py. The test uses ThreadPoolExecutor for concurrency, so the redundant import was cleaned up to avoid unused-import warnings.
@openminddev openminddev merged commit c399b64 into OpenMind:main Apr 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants