def test_cp_dir_path(self): try: fsm = FSManager(temporary=True) fsm.mkdir("rambo", "test1/test2/test3") fsm.cp("rambo", "mambo", "test1/test22/test33") if not (fsm.dir("mambo") is not None and os.path.exists( os.path.join(fsm.prefix_path, "test1/test22/test33"))): raise Exception("Directory hasn't been copied") except Exception as exc: traceback.print_exc() self.fail(exc)
def test_cp_file_alias(self): try: fsm = FSManager(temporary=True) fsm.mkfile("rambo", "test1/test2/test3") fsm.cp("rambo", "test1/test22/test33") if not (fsm.file("test1/test22/test33") is not None and fsm.exists("test1/test22/test33")): raise Exception("File hasn't been copied") except Exception as exc: traceback.print_exc() self.fail(exc)
def test_cp_dir_alias(self): try: fsm = FSManager(temporary=True) fsm.mkdir("rambo", "test1/test2/test3") fsm.cp("rambo", "test1/test22/test33") if not (fsm.dir("test1/test22/test33") is not None and fsm.exists("test1/test22/test33")): raise Exception("Directory hasn't been copied") except Exception as exc: traceback.print_exc() self.fail(exc)
def test_cp_file_path(self): try: fsm = FSManager(temporary=True) fsm.mkfile("rambo", "test1/test2/test3") fsm.cp("rambo", "mambo", "test1/test22/test33") if not (fsm.file("mambo") is not None and os.path.exists(os.path.join(fsm.prefix_path, "test1/test22/test33"))): raise Exception("File hasn't been copied") except Exception as exc: traceback.print_exc() self.fail(exc)