Skip to content

testing: add an idempotence / 'clean frame stays clean' invariant test #164

Description

@JohnnyWilson16

Problem

CONTRIBUTING.md requires a "does not fire when it shouldn't" test per cleaning step, but there's no shared harness asserting the broad invariant: an already-clean frame should pass through fd.clean unchanged (idempotence / zero Actions).

Expected outcome

A parametrized test that feeds several already-clean frames through fd.clean and asserts the result is unchanged and records no data-modifying Actions.

Relevant files

  • New test module under tests/
  • Reads the Action model in src/freshdata/report.py

Acceptance criteria

  • The test passes on main.
  • It would fail if a step mutated a clean column (verify by a local sanity check).
  • Fast lane (pytest -m "not online and not large") stays green; coverage gate holds.

Difficulty / skills

🧪 intermediate — pytest, pandas; optional hypothesis for generated clean frames.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions