Executes simplerResolver with the supplied args, as per subprocess.run.
(*args)
| 97 | |
| 98 | |
| 99 | def execute_cli(*args): |
| 100 | """ |
| 101 | Executes simplerResolver with the supplied args, as per subprocess.run. |
| 102 | """ |
| 103 | this_file = pathlib.Path(__file__) |
| 104 | cli_path = this_file.parent / "simpleResolver.py" |
| 105 | all_args = [sys.executable, str(cli_path)] |
| 106 | all_args.extend(args) |
| 107 | # We explicitly don't want an exception to be raised. |
| 108 | # pylint: disable=subprocess-run-check |
| 109 | return subprocess.run(all_args, capture_output=True, encoding="utf-8") |
| 110 | |
| 111 | |
| 112 | @pytest.fixture |
no outgoing calls
no test coverage detected