Extend unit test suite to >90% coverage#329
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/073008b2-5731-4857-b219-c0f9984e4f9a Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/073008b2-5731-4857-b219-c0f9984e4f9a Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/073008b2-5731-4857-b219-c0f9984e4f9a Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
jan-janssen
May 4, 2026 05:19
View session
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <copilot@github.com>
for more information, see https://pre-commit.ci
Co-authored-by: Copilot <copilot@github.com>
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #329 +/- ##
==========================================
+ Coverage 82.36% 88.76% +6.39%
==========================================
Files 11 11
Lines 1157 1157
==========================================
+ Hits 953 1027 +74
+ Misses 204 130 -74 ☔ 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.
Coverage was at 82% (204 uncovered statements). This adds 55 new tests across 4 files to reach 91% (108 uncovered).
New test files
tests/test_compatibility_calculate.py— Direct unit tests forcompatibility/calculate.py:delta_temp/delta_pressparameter warningstloopparameter, NVE+Langevin warning, NVT/NPT Langevin paths_set_initial_velocity(all flag combinations),_pressure_to_lammps(rotation applied/skipped, error paths),_is_isotropic_hydrostatic,_get_rotation_matrix(no-structure warning),_modify_structure_to_allow_requested_deformation(non-diagonal, already-skewed,AttributeErrorpath)tests/test_compatibility_structure.py— Tests forLammpsStructureCompatibility:atom_type='atomic'and'charge'structure_fullwith empty bond dict via a patched subclass that provides defaultmolecule_ids(the base implementation sets it toNonethen subscripts it without computing it)get_bondserror tolerance for incompatiblestructuretoolkitAPIExtended test files
tests/test_structure.py—UnfoldingPrismwith scalarpbc=True/False(covers theisinstance(pbc, bool)branch) and a skewed cell that triggers the prism folding edge-case branchestests/test_output.py— Four new cases:c_*computes column → populateshdf_generic(line 95)KinEng) → routes tohdf_lammps(line 114)RuntimeError(line 135)mean_pressure[*]log + ortho prism → rotation applied to mean pressures (lines 311–312)