test sdk: Increase test coverage#483
Open
hpoeche wants to merge 6 commits intoeclipse-basyx:developfrom
Open
Conversation
The load_directory() method in aas.adapter was not covered by unit tests, which is now done.
The method get_thumbnail() of the AASXReader class was not covered by unit tests at all. This commit adds full coverage.
The adapter.aasx.AASXWriter class had a low branch coverage especially on failing conditions. These changes introduce unittests that cover cases in which either warnings are emitted or execptions raise.
s-heppner
requested changes
Apr 30, 2026
Member
There was a problem hiding this comment.
We did already have a TestFile.pdf, which was literally an empty PDF. I prefer yours with actual diverse content, though can you replace the old file with it and adapt the paths in the new tests, so it is actually used in all 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.
Previously the test coverage in the
basyx.aas.adapter.aasxpackagewas suboptimal. The
AASXWriterclass was tested end-to-end incombination with
AASXReaderbut special cases, that lead to exceptionswere not covered. Additionally the
load_directory(...)method of thebasyx.aas.adapterpackage was untested.With these changes additional tests are added which cover the code
parts that are mentioned above.