Skip to content

Do conversions tests#3944

Open
shreyannandanwar wants to merge 1 commit into
PecanProject:developfrom
shreyannandanwar:do-conversions-tests
Open

Do conversions tests#3944
shreyannandanwar wants to merge 1 commit into
PecanProject:developfrom
shreyannandanwar:do-conversions-tests

Conversation

@shreyannandanwar
Copy link
Copy Markdown
Contributor

New tests cover:

  • character inputs silently coerced to NULL (legacy fallback)
  • skip logic when input path exists and force is NULL
  • force flag overrides skip logic
  • empty inputs list returns settings unchanged
  • reads pecan.METProcess.xml when needsave is FALSE

Tests added

Test Why
character inputs → NULL character inputs being silently coerced to NULL (legacy fallback)
skip when path exists + force is NULL skip logic when an input already has a path and force is NULL
no skip when force is set force flag overriding the skip logic
empty inputs list → no XML written empty inputs list returning settings unchanged
reads pecan.METProcess.xml via empty inputs reading pecan.METProcess.xml via the empty-inputs entry path

Notes

  • No production code was changed, tests only
  • Tests 4 and 5 are intentionally paired — they pin both
    sides of the path/force branch condition together
  • Tests 1 and 7 both cover the XML read path but via
    different entry conditions, confirming the behavior is
    robust across routes into that branch

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant