diff --git a/.coveragerc b/.coveragerc index 49930d6129d..652175c2430 100644 --- a/.coveragerc +++ b/.coveragerc @@ -5,6 +5,7 @@ omit = distributed/tests/test* distributed/*/tests/test* distributed/cli/utils.py + distributed/cli/dask_spec.py distributed/deploy/ssh.py distributed/_ipython_utils.py distributed/_version.py diff --git a/distributed/cli/dask_scheduler.py b/distributed/cli/dask_scheduler.py index acb4d04198f..d4b9657740f 100755 --- a/distributed/cli/dask_scheduler.py +++ b/distributed/cli/dask_scheduler.py @@ -218,4 +218,4 @@ def go(): if __name__ == "__main__": - go() + go() # pragma: no cover diff --git a/distributed/cli/dask_ssh.py b/distributed/cli/dask_ssh.py index 52cea93ae09..a3dc2aa3030 100755 --- a/distributed/cli/dask_ssh.py +++ b/distributed/cli/dask_ssh.py @@ -162,7 +162,7 @@ def main( if not scheduler: scheduler = hostnames[0] - except IndexError: + except IndexError: # pragma: no cover print(ctx.get_help()) exit(1) @@ -202,25 +202,25 @@ def main( import distributed - print("\n---------------------------------------------------------------") + print("\n---------------------------------------------------------------") # pragma: no cover print( " Dask.distributed v{version}\n".format( version=distributed.__version__ ) - ) - print(f"Worker nodes: {len(hostnames)}") - for i, host in enumerate(hostnames): + ) # pragma: no cover + print(f"Worker nodes: {len(hostnames)}") # pragma: no cover + for i, host in enumerate(hostnames): # pragma: no cover print(f" {i}: {host}") - print(f"\nscheduler node: {scheduler}:{scheduler_port}") - print("---------------------------------------------------------------\n\n") + print(f"\nscheduler node: {scheduler}:{scheduler_port}") # pragma: no cover + print("---------------------------------------------------------------\n\n") # pragma: no cover # Monitor the output of remote processes. This blocks until the user issues a KeyboardInterrupt. c.monitor_remote_processes() # Close down the remote processes and exit. - print("\n[ dask-ssh ]: Shutting down remote processes (this may take a moment).") + print("\n[ dask-ssh ]: Shutting down remote processes (this may take a moment).") # pragma: no cover c.shutdown() - print("[ dask-ssh ]: Remote processes have been terminated. Exiting.") + print("[ dask-ssh ]: Remote processes have been terminated. Exiting.") # pragma: no cover def go(): @@ -229,4 +229,4 @@ def go(): if __name__ == "__main__": - go() + go() # pragma: no cover diff --git a/distributed/cli/dask_worker.py b/distributed/cli/dask_worker.py index 65ea3065fff..762bf9e46c8 100755 --- a/distributed/cli/dask_worker.py +++ b/distributed/cli/dask_worker.py @@ -284,7 +284,7 @@ def main( enable_proctitle_on_current() enable_proctitle_on_children() - if bokeh_port is not None: + if bokeh_port is not None: # pragma: no cover warnings.warn( "The --bokeh-port flag has been renamed to --dashboard-address. " "Consider adding ``--dashboard-address :%d`` " % bokeh_port @@ -375,7 +375,7 @@ def main( else: # if contact address is not present we use the listen_address for contact contact_address = listen_address - except ValueError as e: + except ValueError as e: # pragma: no cover logger.error("Failed to launch worker. " + str(e)) sys.exit(1) @@ -480,7 +480,7 @@ async def run(): if not signal_fired: logger.info("Timed out starting worker") sys.exit(1) - except KeyboardInterrupt: + except KeyboardInterrupt: # pragma: no cover pass finally: logger.info("End worker") @@ -492,4 +492,4 @@ def go(): if __name__ == "__main__": - go() + go() # pragma: no cover