Skip to content

Generator tests #312

@RagnarGrootKoerkamp

Description

@RagnarGrootKoerkamp

Sometimes generators have bugs where they generate valid but unintended data, and you only find them after a while by inspecting the generated .in files manually.

Maybe we could come up with some simple and clean way to test that generators do what was intended. Maybe something like the following in generators.yaml:

tests:
  - command: linear_sequence.py 10 5
    contains: 
      - "0 5 10"
      - "45 50\n"

On the other hand, I'm not exactly sure how useful it is to only be able test for substring containment. But writing code to detect arbitrary patterns and executing that sounds like a lot of overhead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions