Skip to content

test failing comparing float values #13

@tngTUDOR

Description

@tngTUDOR

Current

============================
FAILED tests/unit/test_unit.py::test_energy - AssertionError: Expected u1.conversion_factor(u2) to be 3.6, but got 3.5999999999999996
assert 3.5999999999999996 == 3.6
 +  where 3.5999999999999996 = conversion_factor('MJ')
 +    where conversion_factor = 'kilowatt hour'.conversion_factor
======================== 1 failed, 552 passed in 4.89s =========================

Expected

the comparison in the test is sensitive to float values and passes.

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