def init(self, config): pathA = os.path.join(self.testpath, 'A') pathB = os.path.join(self.testpath, 'B') PyFiSync.cli(['init', pathA]) self.write_config(config) PyFiSync.cli(['reset', '--force', pathA])
def run(self,config,mode='sync',silent=False,flags=tuple()): pathA = os.path.join(self.testpath,'A') pathB = os.path.join(self.testpath,'B') self.write_config(config) if mode == 'sync': cmd = ['sync'] + list(flags) + [pathA] PyFiSync.cli(cmd)
def run(self, config, mode='sync', silent=False): pathA = os.path.join(self.testpath, 'A') pathB = os.path.join(self.testpath, 'B') self.write_config(config) if mode == 'sync': PyFiSync.cli(['sync', pathA]) if mode == 'push': PyFiSync.cli(['push', pathA]) if mode == 'push_all': PyFiSync.cli(['push', '--all', pathA]) if mode == 'pull': PyFiSync.cli(['pull', pathA]) if mode == 'pull_all': PyFiSync.cli(['pull', '--all', pathA])