def test_thread(self):
     t1 = mmp.last_modified(self.p)
     ToucherThread(self.p, interval=1)
     time.sleep(2)
     t2 = mmp.last_modified(self.p)
     print("(t1,t2) = (%d, %d) diff => %d" % (t1, t2, t2 - t1))
     self.assertTrue(t2 > t1)
 def test_toucher(self):
     t1 = mmp.last_modified(self.p)
     t = Toucher(self.p)
     t()
     t2 = mmp.last_modified(self.p)
     print("(t1,t2) = (%d, %d) diff => %d" % (t1, t2, t2 - t1))
     self.assertTrue(t2 > t1)
예제 #3
0
 def test_thread(self):
     t1 = mmp.last_modified(self.p)
     ToucherThread(self.p, interval=1)
     time.sleep(2)
     t2 = mmp.last_modified(self.p)
     print("(t1,t2) = (%d, %d) diff => %d" % (t1, t2, t2 - t1))
     self.assertTrue( t2 > t1 )
예제 #4
0
 def test_toucher(self):
     t1 = mmp.last_modified(self.p)
     t = Toucher(self.p)
     t()
     t2 = mmp.last_modified(self.p)
     print("(t1,t2) = (%d, %d) diff => %d" % (t1, t2, t2 - t1))
     self.assertTrue( t2 > t1 )
예제 #5
0
 def last_ran(self):
     """ Returns the last time media monitor was ran by looking at
     the time when the file at 'index_path' was modified """
     return mmp.last_modified(self.cfg["index_path"])
예제 #6
0
파일: config.py 프로젝트: Gambiit/airtime
 def last_ran(self):
     """ Returns the last time media monitor was ran by looking at
     the time when the file at 'index_path' was modified """
     return mmp.last_modified(self.cfg['index_path'])