Add tests for previously uncovered utility, dataset, and metadatable …#7961
Open
jenshnielsen wants to merge 2 commits intomicrosoft:mainfrom
Open
Add tests for previously uncovered utility, dataset, and metadatable …#7961jenshnielsen wants to merge 2 commits intomicrosoft:mainfrom
jenshnielsen wants to merge 2 commits intomicrosoft:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7961 +/- ##
==========================================
+ Coverage 69.97% 70.12% +0.15%
==========================================
Files 333 333
Lines 32245 32245
==========================================
+ Hits 22562 22613 +51
+ Misses 9683 9632 -51 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds new pytest coverage for several low-/uncovered QCoDeS utility, dataset, and metadatable modules, primarily validating type aliases, small helpers, and export/snapshot utilities.
Changes:
- Introduces new unit tests for
qcodes.utilshelpers (types, numpy/path utilities, deep update, abstractmethod, deprecate). - Adds dataset-focused tests (snapshot diffing, JSON exporter, export config, RunDescriber TypedDict schemas, SQLite settings).
- Adds metadatable base tests to cover previously unexercised branches.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/test_types.py | Tests NumPy type tuple definitions/composition in qcodes.utils.types. |
| tests/utils/test_abstractmethod.py | Tests qcodes_abstractmethod decorator behavior. |
| tests/utils/test_deprecate.py | Tests QCoDeSDeprecationWarning behavior and visibility. |
| tests/utils/test_deep_update_utils.py | Tests recursive dict merge semantics of deep_update. |
| tests/utils/test_path_helpers.py | Tests QCoDeS path helper utilities and env var behavior. |
| tests/utils/test_numpy_utils.py | Tests ragged/uniform array conversion helper. |
| tests/dataset/test_snapshot_utils.py | Tests dataset snapshot diffing (diff_param_snapshots). |
| tests/dataset/test_json_exporter.py | Tests JSON linear/heatmap export utilities and templates. |
| tests/dataset/test_export_config.py | Tests export config get/set helpers and enum mapping. |
| tests/dataset/test_rundescribertypes.py | Tests TypedDict schemas/unions for RunDescriber versioning. |
| tests/dataset/test_sqlite_settings_extended.py | Adds broader coverage for SQLite settings/limits helpers. |
| tests/test_metadatable_base.py | Adds coverage for Metadatable/MetadatableWithName behavior. |
1dcebb6 to
9239009
Compare
…modules Add 128 new tests across 12 new test files targeting modules that previously had 0% or very low test coverage (excluding instrument_drivers). New test files: - tests/utils/test_types.py: numpy type tuple definitions and composition - tests/utils/test_abstractmethod.py: qcodes_abstractmethod decorator - tests/utils/test_deprecate.py: QCoDeSDeprecationWarning class - tests/utils/test_deep_update_utils.py: recursive dict merging - tests/utils/test_path_helpers.py: QCoDeS path resolution utilities - tests/utils/test_numpy_utils.py: ragged array conversion - tests/dataset/test_snapshot_utils.py: dataset snapshot diffing - tests/dataset/test_json_exporter.py: JSON linear/heatmap export - tests/dataset/test_export_config.py: export config get/set functions - tests/dataset/test_rundescribertypes.py: TypedDict versioned schemas - tests/dataset/test_sqlite_settings_extended.py: SQLite settings/limits - tests/test_metadatable_base.py: Metadatable and MetadatableWithName Non-driver test coverage: 64.7% -> 65.4% Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
b9bbb6d to
6f67291
Compare
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.
…modules
Add 128 new tests across 12 new test files targeting modules that previously had 0% or very low test coverage (excluding instrument_drivers).
New test files:
Coverage: from 69.97% to 70.12% +0.15%