Skip to content

Extend test suite: cover array inputs + all methods #4

@sadielbartholomew

Description

@sadielbartholomew

The test suite is overdue some love, notably because most of the > 50 methods in the Units class are not directly tested:

$ git grep "def " units.py | wc -l
65
$ git grep "def " test/test_Units.py | wc -l
5

where one of the latter five, test_Units_BINARY_AND_UNARY_OPERATORS, covers perhaps OOM 10 Units methods to some extent, but the rest focus on specific methods so still there is a deficit of ~50 methods to explicitly cover. And another of those five is very minimal as I just added it to expose 4060945).

Furthermore, the handling of NumPy objects is not tested at all (numpy is not imported in the test module). We should ensure this is tested where appropriate, e.g. to check that arrays are processed as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingIssues related to units tests and their coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions