from epc_data.attributes.attribute_utils import extract_thermal_transmittance, clean_description def test_extract_thermal_transmittance(): description = "average thermal transmittance 2.3 w/m-¦k" assert extract_thermal_transmittance({}, description) == ( {'thermal_transmittance': 2.3, 'thermal_transmittance_unit': 'w/m-¦k'}, '') def test_clean_description(): test_cases = [ ("this:is;a*test", "this is a test"), ("hello@world", "hello world"), ("what?!?", "what "), ("hello(world)", "hello world "), ("", ""), (":;*@?!", " "), ("no special chars", "no special chars") ] for input_str, expected_output in test_cases: assert clean_description(input_str) == expected_output