• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pyiron / pyiron_workflow_atomistics / 25929618828

15 May 2026 04:40PM UTC coverage: 89.094% (+57.3%) from 31.835%
25929618828

push

github

web-flow
test: bump unit-test coverage from 66% to 83% (#44)

* test: bump unit-test coverage from 66% to 83%

Adds targeted tests for the largest coverage gaps and tightens the
input validation on `_axis_index_to_label` to match.

Files added:
  - tests/unit/_internal/test_workdir.py            (workdir 0% → 100%)
  - tests/unit/physics/test_gb_searcher.py          (searcher 0% → 74%)
  - tests/unit/physics/test_gb_constructor_helpers.py (constructor 40% → 95%)
  - tests/unit/structure/test_defects.py            (defects 11% → 99%)
  - tests/unit/physics/test_phonons_helpers.py      (harmonic 24% → 46%,
                                                     anharmonic 32% → 41%,
                                                     md_renormalised 43% → 48%)
  - tests/integration/test_gb_code_pipeline.py      (construct_GB_from_GBCode end-to-end)

The phonon tests cover the cheap pure-Python helpers (supercell-matrix
normalisation, band-path derivation, kappa-Voigt-to-tensor conversion,
seed plumbing, convergence checks) so they run on plain CI without the
optional `[phonons]`/`[phonons-md]` extras. The heavier paths are gated
behind `pytest.importorskip("phonopy"/"phono3py"/"dynaphopy")` and marked
slow.

Fix: `_axis_index_to_label` previously accepted any value `int()` could
coerce, so `1.5` silently truncated to axis `1` and `True`/`False` mapped
to `y`/`x`. Now rejects non-`int`/non-`np.integer` and `bool` explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* style: black-format new test files after coverage commit

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ci: run pytest --cov for coveralls instead of unittest discover

The upstream pyiron/actions tests-and-coverage workflow runs
`coverage run -m unittest discover tests`, which silently skips every
pytest-style test in this repo (most of tests/unit/* and all of the new
files in this PR). Locally that produces 32% coverage vs 83% with pytest.

Disa... (continued)

2459 of 2760 relevant lines covered (89.09%)

0.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.92
/physics/_grain_boundary_code/constructor.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc