Exemplo n.º 1
0
 def test_duration(self):
     interval = Interval()
     interval.start()
     first = interval.duration
     time.sleep(0.1)
     second = interval.duration
     self.assertTrue(second > first)
Exemplo n.º 2
0
 def test_running(self):
     interval = Interval()
     self.assertFalse(interval.running)
     interval.start()
     self.assertTrue(interval.running)
     interval.stop()
     self.assertFalse(interval.running)
Exemplo n.º 3
0
 def test_running(self):
     interval = Interval()
     self.assertFalse(interval.running)
     interval.start()
     self.assertTrue(interval.running)
     interval.stop()
     self.assertFalse(interval.running)
Exemplo n.º 4
0
 def test_started(self):
     interval = Interval()
     self.assertFalse(interval.started)
     interval.start()
     self.assertTrue(interval.started)
Exemplo n.º 5
0
 def test_split(self):
     interval = Interval()
     interval.start()
     splitted_interval = interval.split()
     self.assertEquals(interval.stop_instant,
                       splitted_interval.start_instant)
Exemplo n.º 6
0
 def test_now(self):
     interval = Interval.now()
     self.assertTrue(interval.started)
     self.assertFalse(interval.stopped)
Exemplo n.º 7
0
 def test_duration(self):
     interval = Interval()
     interval.start()
     first = interval.duration
     second = interval.duration
     self.assertTrue(second > first)
Exemplo n.º 8
0
 def test_started(self):
     interval = Interval()
     self.assertFalse(interval.started)
     interval.start()
     self.assertTrue(interval.started)
Exemplo n.º 9
0
 def test_split(self):
     interval = Interval()
     interval.start()
     splitted_interval = interval.split()
     self.assertEquals(interval.stop_instant, splitted_interval.start_instant)
Exemplo n.º 10
0
 def test_now(self):
     interval = Interval.now()
     self.assertTrue(interval.started)
     self.assertFalse(interval.stopped)