Skip to content

add a library for generating test suites for a given state machine #2

@exarkun

Description

@exarkun

Since the states are known and the inputs are known it's possible to generate a list of all of the possible scenarios that the state machine is supposed to handle. It's reasonable to say that each of these must have at least one unit test.

A library can generate a TestCase (or a mixin or something) that defines one test for each of these cases and gives them failing implementations that need to be overridden. This will give developers a very easy way to know the minimum set of tests they still haven't written.

Possibly there's a better interface than "a thing you can subclass" for this - but it's not immediately obvious to me since the way unittest works is pretty firmly "subclass this thing". (But... like... a class decorator maybe?)

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