Пример #1
0
 def test_from_str(self, state: str):
     entry = TimeProgEntry.from_str(str(state), "00:00", "00:00")
     assert entry.state == state
Пример #2
0
 def test_str(self, state: str):
     assert str(TimeProgEntry.from_str(str(state), "00:00", "00:00")) ==\
         "state={:d}, time={!s}".format(state, TimeProgPeriod.from_str("00:00", "00:00"))
Пример #3
0
 def test_from_str_raises_ValueError(self, state: str):
     with pytest.raises(ValueError):
         TimeProgEntry.from_str(state, "00:00", "00:00")