示例#1
0
文件: run.py 项目: kykyev/pidbuzh
 def start(self):
     with putils.working_dir(self.rootpath):
         putils.makedir(self.target_dir)
     self.evh._rebuild_all()
     print('==> Start monitoring %s (type c^c to exit)' % pjoin(self.rootpath, self.source_dir))
     print('==> Writing to %s' % pjoin(self.rootpath, self.target_dir))
     self.notifier.loop()
示例#2
0
 def test_relative_path(self):
     with putils.working_dir('/tmp'):
         putils.makedir('test-pidbuzh')
     assert os.path.exists(self.test_dir)
示例#3
0
 def test_exists(self):
     local("mkdir {}".format(self.test_dir))
     putils.makedir(self.test_dir)
     assert os.path.exists(self.test_dir)
示例#4
0
 def test_not_exists(self):
     putils.makedir(self.test_dir)
     assert os.path.exists(self.test_dir)