Changes working directory and returns to previous on exit.
(path: PathLike)
| 11 | |
| 12 | @contextlib.contextmanager |
| 13 | def working_directory(path: PathLike): |
| 14 | """Changes working directory and returns to previous on exit.""" |
| 15 | prev_cwd = Path.cwd() |
| 16 | os.chdir(path) |
| 17 | try: |
| 18 | yield |
| 19 | finally: |
| 20 | os.chdir(prev_cwd) |
| 21 | |
| 22 | |
| 23 | def build_cpp_examples(build_dir: PathLike, trt_dir: PathLike, |
no outgoing calls
no test coverage detected