Split tests into individual files#28
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28 +/- ##
==========================================
+ Coverage 94.86% 95.05% +0.19%
==========================================
Files 15 15
Lines 1051 1051
==========================================
+ Hits 997 999 +2
+ Misses 54 52 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This pull request adds a comprehensive suite of unit and integration tests for the
tro_utilspackage, focusing on its models and core functionality. It introduces shared fixtures and helper functions to streamline test setup, and covers serialization, deserialization, and behavior of key classes such asArtifactArrangement,ArtifactComposition,ArtifactLocation,CompositionFingerprint, andHashValue. The tests ensure correct handling of extra vocabulary in JSON-LD contexts, artifact deduplication, fingerprinting, and roundtrip consistency.Key changes include:
Test Infrastructure and Shared Utilities
conftest.pyfor setting up temporary workspaces, GPG environments, and test profiles, enabling consistent and isolated test environments.helpers.pyto createTROobjects with GPG configuration, simplifying cryptographic test setup.Model Unit Tests
ArtifactArrangement, verifying directory scanning, deduplication, snapshotting, and integration withTransparentResearchObject.ArtifactComposition, covering artifact addition, fingerprinting, and retrieval by hash or ID.ArtifactLocation, focusing on JSON-LD serialization and deserialization.CompositionFingerprint, ensuring deterministic computation and JSON-LD roundtrips.HashValue, testing parsing, serialization, legacy support, and equality.Extra Context and JSON-LD Handling
@contextof JSON-LD, including propagation, roundtrip persistence, and extension through theTROfacade.