(new_dir)
| 25 | |
| 26 | @contextlib.contextmanager |
| 27 | def current_directory(new_dir): |
| 28 | cur_dir = getcwd() |
| 29 | logger.info(''.join((Err_Fore.CYAN, '-> directory context ', new_dir, |
| 30 | Err_Fore.RESET))) |
| 31 | chdir(new_dir) |
| 32 | yield |
| 33 | logger.info(''.join((Err_Fore.CYAN, '<- directory context ', cur_dir, |
| 34 | Err_Fore.RESET))) |
| 35 | chdir(cur_dir) |
| 36 | |
| 37 | |
| 38 | @contextlib.contextmanager |
no outgoing calls
no test coverage detected