Skip to content

Reduce the amount of boilerplate code in tests #322

Description

@kasanari

There is an bordering on ridiculous amount of boilerplate code in the tests, mainly dealing with setting up the MalSimulator and Scenario objects. This means that any changes to the way these objects work generates a huge amount of work refactoring nearly every test.

I would suggest consolidating the environment setup to a smaller set of simulator objects (like one or two), instantiated using pytest fixtures, rather than each test setting up a sim. In the best of worlds, I think the unit tests should be able to test things without having to set up the entire simulator, but I know what the legacy of this thing looks like and why that has been tricky to do.

This might be easier once #315 is done, since it removes the blight that are the register_defender and register_attacker functions.

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