def move_file(self, source, dest, sync=True):
"""
move file from source to dest
:param source:
:param dest:
:param sync: if sync=Ture, block util move command is over
:return:
"""
if os.path.exists(dest):
os.remove(dest)
if sync:
command = 'mv ' + source + ' ' + dest
self.__sync_exec_command(command)
else:
shutil.move(source, dest)
比如以上这个方法,我想用 unittest 对他进行测试,需要怎么做呢?