# Path: modernrpc/exceptions.py
# RPC_INVALID_PARAMS = -32602


import pytest
from modernrpc.exceptions import RPC_INVALID_PARAMS
                "list",
                "float",
                "int",
                "int",
            ]
        ]

    def test_get_signature_3(self, any_rpc_client):
        exc_match = r"Invalid parameters: Unknown method nonexistent_method. Unable to retrieve signature."
        with pytest.raises(
            any_rpc_client.error_response_exception, match=exc_match
        ) as exc_info:
            any_rpc_client.call("system.methodSignature", "nonexistent_method")
        any_rpc_client.assert_exception_code(exc_info.value, RPC_INVALID_PARAMS)

    def test_method_help_with_doc(self, any_rpc_client):
        help_text = any_rpc_client.call("system.methodHelp", "divide")
        assert "Divide a numerator by a denominator" in help_text

    def test_method_help_no_doc(self, any_rpc_client):
        help_text = any_rpc_client.call("system.methodHelp", "add")
        assert type(help_text) == str
        assert help_text == ""

    def test_method_help_invalid_method(self, any_rpc_client):
        exc_match = r"Invalid parameters: Unknown method nonexistent_method. Unable to retrieve signature."
        with pytest.raises(
            any_rpc_client.error_response_exception, match=exc_match
        ) as exc_info:
            any_rpc_client.call("system.methodSignature", "nonexistent_method")

# Path: modernrpc/exceptions.py
# RPC_INVALID_PARAMS = -32602


# Path: tests/functional/test_base.py
import pytest
from modernrpc.exceptions import RPC_INVALID_PARAMS

                "list",
                "float",
                "int",
                "int",
            ]
        ]

    def test_get_signature_3(self, any_rpc_client):
        exc_match = r"Invalid parameters: Unknown method nonexistent_method. Unable to retrieve signature."
        with pytest.raises(
            any_rpc_client.error_response_exception, match=exc_match
        ) as exc_info:
            any_rpc_client.call("system.methodSignature", "nonexistent_method")
        any_rpc_client.assert_exception_code(exc_info.value, RPC_INVALID_PARAMS)

    def test_method_help_with_doc(self, any_rpc_client):
        help_text = any_rpc_client.call("system.methodHelp", "divide")
        assert "Divide a numerator by a denominator" in help_text

    def test_method_help_no_doc(self, any_rpc_client):
        help_text = any_rpc_client.call("system.methodHelp", "add")
        assert type(help_text) == str
        assert help_text == ""

    def test_method_help_invalid_method(self, any_rpc_client):
        exc_match = r"Invalid parameters: Unknown method nonexistent_method. Unable to retrieve signature."
        with pytest.raises(
            any_rpc_client.error_response_exception, match=exc_match
        ) as exc_info:
            any_rpc_client.call("system.methodSignature", "nonexistent_method")

        any_rpc_client.assert_exception_code(exc_info.value, RPC_INVALID_PARAMS)