454 add unit tests#466
Merged
Merged
Conversation
Closed
Contributor
There was a problem hiding this comment.
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_instancefunction - 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief summary of changes
Notes