def test_ceiling_height(dom_ria_flat_parser: DomRiaFlatParser): assert isclose(dom_ria_flat_parser._ceiling_height(' 2. 5 '), 2.5) # noqa assert isclose(dom_ria_flat_parser._ceiling_height(' 2 .87'), 2.87) # noqa assert isclose(dom_ria_flat_parser._ceiling_height(' 27'), 2.7) # noqa assert isclose(dom_ria_flat_parser._ceiling_height('330 '), 3.3) # noqa assert isclose(dom_ria_flat_parser._ceiling_height(' 2 800'), 2.8) # noqa
def test_ceiling_height_emptiness(dom_ria_flat_parser: DomRiaFlatParser): assert dom_ria_flat_parser._ceiling_height('sdsfs') is None # noqa assert dom_ria_flat_parser._ceiling_height(None) is None # noqa