Skip to content

Unit Test dtypes and tolerances #149

@garrettwrong

Description

@garrettwrong

Following #148 and #146 , some of the unit tests can be tightened up.

Basically, I have encountered python tests that are currently operating in mixed mode; at least one of which has caused pipeline unit test failures. It should be possible to run the tests in either/both single and double precision, with respective tolerances automatically reflected. Really this is more of a discussion topic, and less an issue since other issues should mostly "fix".

It would be good to decide this early on and be consistent as the python code grows. Instead of being ad hoc, I propose we decide on one of these for the whole project:

  • Use singles for all UT
    • If a numerically sensitive method has a special double requirement for convergence etc, that should be a very specific test, and hopefully not bleed into other areas.
  • Use doubles for all UT
    • This should not require an "exceptions".
  • Run UT in both modes with two different tolerances
    • Abstracting the tolerance selection is easy if we want to...
    • Simply skip (with message) a numerically sensitive test that isn't worth doing in singles.

I lean towards the last two (doubles or both), because I would prefer avoiding special cases. Thoughts?

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