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)
Example #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 )
Example #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 )
Example #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"])
Example #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'])