Skip to content

_Material_Test is a terrible class name. #2394

@john-science

Description

@john-science

In our materials unit tests we have a class named _Material_Test:

class _Material_Test:

This class name starts with an underscore, so apparently it is meant to be private to that file. But it is also clearly a base class, imported and used ~50 times throughout ARMI. So, we should at least get rid of that leading underscore.

Also, our test name convention in ARMI is CamelCase not Snake_Case, and we usually start test class names with TestX. So you would expect this class to be named:

TestMaterial

However, if we name it that, then the pytest / unittest autodiscovery will find this file and try to run the tests directly. So, whatever name we pick, we have to avoid that. MAYBE it will turn out this is the best solution, in which case this ticket can just revert to "Add a better docstring to this class". We'll see.

The only down side of this ticket is it is API-breaking, so this will require communicating with our downstream power users (and opening PRs for them, where possible0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cleanupCode/comment cleanup: Low Prioritylow priorityStyle points and non-featurestestingRelated to tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions