Skip to content

454 add unit tests#466

Merged
kjy5 merged 35 commits into
mainfrom
454-add-unit-tests
Jun 19, 2025
Merged

454 add unit tests#466
kjy5 merged 35 commits into
mainfrom
454-add-unit-tests

Conversation

@kjy5
Copy link
Copy Markdown
Member

@kjy5 kjy5 commented Jun 19, 2025

Brief summary of changes

  • 100% backend coverage
  • Testing infrastructure
  • Fixed some bugs with the backend

Notes

@kjy5 kjy5 requested a review from Copilot June 19, 2025 18:40
@kjy5 kjy5 linked an issue Jun 19, 2025 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive backend unit tests and refactors startup, binding, and error‐handling logic while centralizing constants and improving CI.

  • Introduces pytest-based testing infrastructure and 100% backend coverage
  • Refactors startup to use a dynamic get_binding_instance function
  • Centralizes error messages/constants and updates server/platform handler to use them

Reviewed Changes

Copilot reviewed 10 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/conftest.py Added shared dummy fixtures for tests
src/ephys_link/utils/startup.py New get_binding_instance to select/instantiate bindings
src/ephys_link/utils/constants.py Centralized error messages and added new error generators
src/ephys_link/front_end/console.py Made enable_debug optional in Console constructor
src/ephys_link/back_end/server.py Switched to constants for error responses; cleaned up parsing logic
src/ephys_link/back_end/platform_handler.py Switched constructor to take binding instance; replaced inline messages with constants
src/ephys_link/main.py Updated to call get_binding_instance and pass binding to handler
scripts/move_tester.py Updated import for Console but did not update handler instantiation
pyproject.toml Added pytest and coverage dependencies and config
.github/workflows/test.yml New GitHub Actions workflow for tests

Comment thread scripts/move_tester.py Outdated
Comment thread src/ephys_link/utils/constants.py Outdated
@kjy5 kjy5 enabled auto-merge (squash) June 19, 2025 18:47
@kjy5 kjy5 merged commit 9ebe48f into main Jun 19, 2025
6 checks passed
@kjy5 kjy5 deleted the 454-add-unit-tests branch June 19, 2025 18:47
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.

Add unit tests

2 participants