Example #1
0
 def run_console(self, args: Namespace, chain_config: ChainConfig) -> None:
     try:
         console(chain_config.jsonrpc_ipc_path,
                 use_ipython=self.use_ipython)
     except FileNotFoundError as err:
         self.logger.error(str(err))
         sys.exit(1)
Example #2
0
 def run_console(cls, args: Namespace,
                 trinity_config: TrinityConfig) -> None:
     try:
         console(trinity_config.jsonrpc_ipc_path,
                 use_ipython=is_ipython_available())
     except FileNotFoundError as err:
         cls.get_logger().error(str(err))
         sys.exit(1)
Example #3
0
def test_console(caplog, jsonrpc_ipc_pipe_path):
    # if ipc_path is not found, raise an exception with a useful message
    with pytest.raises(FileNotFoundError):
        console(Path(jsonrpc_ipc_pipe_path))
        assert create_missing_ipc_error_message(jsonrpc_ipc_pipe_path) in caplog.text