Conversation
…es, and validation - Implement tests for LoadService to validate filtering, grouping, and ordering of load metrics. - Create tests for MixService to ensure proper handling of mix metrics, including filtering and grouping. - Add tests for MixShareService to verify correct processing of mix share metrics and their structure. - Develop tests for ScoreService to check filtering of scores, aggregation behavior, and grouping by zone and validity. - Introduce tests for ZoneService to validate merging of zone metadata and provider normalization. - Implement comprehensive tests for validation functions to ensure correct handling of various input scenarios.
| import pytest | ||
| from fastapi.testclient import TestClient | ||
|
|
||
| from tests.unit.service.helpers import FakeMetric # noqa: F401 – re-exported for tests |
- Implement CI workflow for testing across multiple Python versions - Create publish workflow for building and deploying Python package to PyPI and Docker - Add release-please workflow for automated versioning and changelog generation - Introduce pre-commit hooks for code quality checks - Add CODE_OF_CONDUCT.md and SECURITY.md for community guidelines and vulnerability reporting - Create CONTRIBUTING.md to outline contribution process and standards - Add Dockerfile for containerizing the application - Implement scripts for verifying wheel contents and Docker entrypoint - Add integration and unit tests for application functionality
| assert len(svc.get_exports()[0].series) == 2 | ||
|
|
||
|
|
||
| def test_get_exports_with_destination_filter() -> None: |
| assert len(svc.get_flow_share()[0].series) == 2 | ||
|
|
||
|
|
||
| def test_get_flow_share_with_destination_filter() -> None: |
| assert results == [] | ||
|
|
||
|
|
||
| def test_get_impact_share_with_scope_filter() -> None: |
| assert len(svc.get_imports()[0].series) == 2 | ||
|
|
||
|
|
||
| def test_get_imports_with_source_filter() -> None: |
- Implemented a test to verify that a file handler is added when a log file is specified in the logging setup. - Updated the integration test environment description to clarify that it runs against the full FastAPI app with storage mocked.
| @@ -0,0 +1,170 @@ | |||
| import logging | |||
| from pathlib import Path | |||
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.
No description provided.