Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def test_step_set_invalid(self):
     time = TimeInput()
     with assert_raises(ValueError):
         time.step = 0
Пример #4
0
 def test_step_set_invalid(self):
     time = TimeInput()
     with assert_raises(ValueError):
         time.step = 0