def test_step(self): time = TimeInput() time.step = 12.3 assert_equal(12.3, time.step) assert_equal('<input step="12.3" type="time"/>', str(time)) time.step = None assert_is_none(time.step) assert_equal('<input type="time"/>', str(time)) time.set_attribute("step", "any") assert_is_none(time.step)
def test_step_get_invalid(self): time = TimeInput() time.set_attribute("step", "invalid") assert_is_none(time.step) time.set_attribute("step", "0") assert_is_none(time.step) time.set_attribute("step", "-1") assert_is_none(time.step)