Beispiel #1
0
 def testTypeError(self):
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs(0.1)
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs("a")
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs(True)
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs([1, 2, 0.1])
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs([1, 2, "a"])
     with pytest.raises(TypeError):
         pulsebox.ino_events_rel2abs([1, 2, True])
Beispiel #2
0
 def testValid(self):
     self.assertEqual(pulsebox.ino_events_rel2abs([1, 2, 3, 4, 5]), [1, 3, 6, 10, 15])