Coverage for procpath/cmd/__init__.py: 100%
6 statements
« prev ^ index » next coverage.py v6.5.0, created at 2025-04-05 18:56 +0000
« prev ^ index » next coverage.py v6.5.0, created at 2025-04-05 18:56 +0000
1import importlib
4__all__ = 'CommandError', 'get_command'
7class CommandError(Exception):
8 """Generic command error."""
11def get_command(name: str):
12 """
13 Return command function by its name.
15 This is mainly used to provide commands on-demand to avoid
16 import-the-world delay in CLI.
17 """
19 module = importlib.import_module(f'.{name}', __package__) (empty)procpath.test.cmd.TestPlayCommand.test_play_all_mockedprocpath.test.cmd.TestPlayCommand.test_play_dry_runprocpath.test.cmd.TestPlayCommand.test_play_explicit_extendsprocpath.test.cmd.TestPlayCommand.test_play_negative_flagprocpath.test.cmd.TestPlayCommand.test_play_plot_flag_args_alignedprocpath.test.cmd.TestPlayCommand.test_play_queryprocpath.test.cmd.TestPlayCommand.test_play_record_plotprocpath.test.cmd.TestPlayCommand.test_play_section_inheritanceprocpath.test.cmd.TestPlayCommand.test_play_watchprocpath.test.cmd.TestPlayCommand.test_play_watch_override
20 return getattr(module, 'run') (empty)procpath.test.cmd.TestPlayCommand.test_play_all_mockedprocpath.test.cmd.TestPlayCommand.test_play_dry_runprocpath.test.cmd.TestPlayCommand.test_play_explicit_extendsprocpath.test.cmd.TestPlayCommand.test_play_negative_flagprocpath.test.cmd.TestPlayCommand.test_play_plot_flag_args_alignedprocpath.test.cmd.TestPlayCommand.test_play_queryprocpath.test.cmd.TestPlayCommand.test_play_record_plotprocpath.test.cmd.TestPlayCommand.test_play_section_inheritanceprocpath.test.cmd.TestPlayCommand.test_play_watchprocpath.test.cmd.TestPlayCommand.test_play_watch_override