(self, local, remote)
| 51 | shutil.copy(local, os.path.join(path, remote)) |
| 52 | |
| 53 | def load(self, local, remote): |
| 54 | if self.load_func is not None: |
| 55 | self.load_func(local, remote) |
| 56 | else: |
| 57 | path = os.path.abspath( |
| 58 | os.path.join(Path.cwd(), 'data', 'test', 'regression')) |
| 59 | baseline = os.path.join(path, remote) |
| 60 | if not os.path.exists(baseline): |
| 61 | raise ValueError(f'base line file {baseline} not exist') |
| 62 | print( |
| 63 | f'local file found:{baseline}, md5:{hashlib.md5(open(baseline,"rb").read()).hexdigest()}' |
| 64 | ) |
| 65 | if os.path.exists(local): |
| 66 | os.remove(local) |
| 67 | os.symlink(baseline, local, target_is_directory=False) |
| 68 | |
| 69 | @contextlib.contextmanager |
| 70 | def monitor_module_single_forward(self, |
no test coverage detected