Ejemplo n.º 1
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)
Ejemplo n.º 2
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)
Ejemplo n.º 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 )
Ejemplo n.º 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 )
Ejemplo n.º 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"])
Ejemplo n.º 6
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'])