Skip to content

[TD] Align TestFunction required_file Contract #228

@ArthurCRodrigues

Description

@ArthurCRodrigues

Summary

The TestFunction ABC exposes a required_file_type property, but every concrete test class defines required_file instead. The abstract property defaults to None, so the contract is unenforced and inconsistent.

Scope

  • Pick a single property name (per roadmap, required_file) and declare it on the ABC.
  • Update all template tests to implement the new abstract property and remove the mismatched variant.
  • Adjust metadata generation to consume the standardized property.

Impacted Files

  • autograder/models/abstract/test_function.py
  • All files under autograder/template_library/** containing test classes

Risks

  • Missing a template override would break runtime attribute access; add tests that walk every test class and ensure the property exists.

Acceptance Criteria

  • ABC enforces the property name, templates comply, and template metadata output remains correct.

References

  • docs/roadmaps/TECHNICAL_DEBT_ROADMAP.md (Item 13)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions