Skip to content

Add test coverage for Timetable.load method #159

@coderabbitai

Description

@coderabbitai

Description

The Timetable.load method in supertask/model.py has branches for JSON and YAML loading as well as error handling for unsupported file types, but these aren't covered by tests.

Requirements

Please add tests for:

  • Loading a JSON file via Timetable.load(…) and verifying the returned data
  • Loading a .yml file (if treated differently than .yaml)
  • Passing an unsupported extension (e.g. .txt) and asserting that NotImplementedError is raised

Reference

Technical Details

The method is located at lines 181-189 in supertask/model.py. Current tests only exercise the YAML branch.

Suggested locations to add tests:

  • tests/test_core.py or a new file under tests/
  • Consider using temporary files or fixtures for JSON/.yml content and an invalid-extension case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions