Skip to content

Add comprehensive test coverage for PyNeb core classes and utilities#74

Closed
Copilot wants to merge 1 commit into
masterfrom
copilot/analyze-test-coverage
Closed

Add comprehensive test coverage for PyNeb core classes and utilities#74
Copilot wants to merge 1 commit into
masterfrom
copilot/analyze-test-coverage

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 7, 2026

The codebase had only 3 tests covering basic object instantiation attributes, leaving ~10,000 lines of core library functionality with zero functional test coverage. This PR adds 9 new test files bringing the total from 3 to 215 tests.

New test files

  • tests/test_atom.pyAtom: getA, getOmega, getCollRates, getStatWeight, getEnergy, getTransition, getPopulations, getCritDensity, getEmissivity, getTemDen, getIonAbundance, density ratio limits, scalar/array/product-mode variants, repr
  • tests/test_recatom.pyRecAtom: H1/He1/He2 instantiation, getEmissivity (scalar, array, product/non-product modes), getIonAbundance, getTransition, Case A vs B
  • tests/test_observation.pyObservation/EmissionLine: addLine, removeLine, getLine, getIntens, getSortedLines, getUniqueAtoms, addMonteCarloObs, fillObs, correctIntens
  • tests/test_redcorr.pyRedCorr: getCorr/getCorrHb across multiple laws, getErrCorr, setCorr, cHbetaFromEbvEbvFromCHbeta roundtrips, AV/E_BV property setters
  • tests/test_diagnostics.pyDiagnostics: addAll, addDiag (builtin/custom/list/by-atom), delDiag, getCrossTemDen, eval_diag, addClabel, setAtoms
  • tests/test_emis_grid.pyEmisGrid: grid shape/range invariants, getGrid by levels/wavelength/expression
  • tests/test_continuum.pyContinuum: gff, two_photon (including Ly-α cut-off physics), FreeFree, get_continuum
  • tests/test_icf.pyICF: getAvailableICFs, addICF/delICF, getExpression, getReference/getURL, getElemAbundance
  • tests/test_utils_misc.pyint_to_roman/roman_to_int roundtrips, parseAtom, strExtract, quiet_divide, vactoairairtovac roundtrip

…agnostics, EmisGrid, Continuum, ICF, and utils

Agent-Logs-Url: https://github.com/Morisset/PyNeb_devel/sessions/9dd8ab0b-432f-4824-ba61-fea31922afcf

Co-authored-by: Morisset <442951+Morisset@users.noreply.github.com>
Copilot AI requested a review from Morisset April 7, 2026 16:15
@Morisset Morisset closed this Apr 7, 2026
@Morisset Morisset deleted the copilot/analyze-test-coverage branch April 8, 2026 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants