Repository: bitcoin/bitcoin
File: test/functional/test_framework/test_framework.py (Python)

Code before:
    def is_bitcoin_tx_compiled(self):
        """Checks whether bitcoin-tx was compiled."""
        return self.config["components"].getboolean("BUILD_BITCOIN_TX")

    def is_bitcoin_util_compiled(self):
        """Checks whether bitcoin-util was compiled."""
        return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL")

    def is_bitcoin_chainstate_compiled(self):
        """Checks whether bitcoin-chainstate was compiled."""
        return self.config["components"].getboolean("ENABLE_BITCOIN_CHAINSTATE")

    def is_zmq_compiled(self):
        """Checks whether the zmq module was compiled."""
        return self.config["components"].getboolean("ENABLE_ZMQ")

    def is_usdt_compiled(self):
        """Checks whether the USDT tracepoints were compiled."""
        return self.config["components"].getboolean("ENABLE_USDT_TRACEPOINTS")

    def has_blockfile(self, node, filenum: str):
        return (node.blocks_path/ f"blk{filenum}.dat").is_file()

    def convert_to_json_for_cli(self, text):
        if self.options.usecli:
            return json.dumps(text)
        return text


Review comment (suggestion):
In commit "test: add is_ipc_enabled() and skip_if_no_ipc() functions" (eae32d1a9b5c62707de6afd9832d40de859dd42d)

Not important, but might be better to rename enabled to compiled here to be more similar to surrounding functions which check ENABLE_XXX  but are called is_xxx_compiled. (I think your PR actually did this originally but I didn't notice the pattern it was following)

Code after:
        if not self.is_external_signer_compiled():
            raise SkipTest("external signer support has not been compiled.")

    def skip_if_running_under_valgrind(self):
        """Skip the running test if Valgrind is being used."""
        if self.options.valgrind:
            raise SkipTest("This test is not compatible with Valgrind.")

    def is_cli_compiled(self):
        """Checks whether bitcoin-cli was compiled."""
        return self.config["components"].getboolean("ENABLE_CLI")

    def is_external_signer_compiled(self):
        """Checks whether external signer support was compiled."""
        return self.config["components"].getboolean("ENABLE_EXTERNAL_SIGNER")

    def is_wallet_compiled(self):
        """Checks whether the wallet module was compiled."""
        return self.config["components"].getboolean("ENABLE_WALLET")

    def is_wallet_tool_compiled(self):
        """Checks whether bitcoin-wallet was compiled."""
        return self.config["components"].getboolean("ENABLE_WALLET_TOOL")

    def is_bitcoin_tx_compiled(self):
        """Checks whether bitcoin-tx was compiled."""
        return self.config["components"].getboolean("BUILD_BITCOIN_TX")

    def is_bitcoin_util_compiled(self):
        """Checks whether bitcoin-util was compiled."""
        return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL")

    def is_bitcoin_chainstate_compiled(self):
        """Checks whether bitcoin-chainstate was compiled."""
        return self.config["components"].getboolean("ENABLE_BITCOIN_CHAINSTATE")

    def is_zmq_compiled(self):
        """Checks whether the zmq module was compiled."""
        return self.config["components"].getboolean("ENABLE_ZMQ")

    def is_usdt_compiled(self):
        """Checks whether the USDT tracepoints were compiled."""
        return self.config["components"].getboolean("ENABLE_USDT_TRACEPOINTS")

    def is_ipc_compiled(self):
        """Checks whether ipc was compiled."""
        return self.config["components"].getboolean("ENABLE_IPC")

    def has_blockfile(self, node, filenum: str):
        return (node.blocks_path/ f"blk{filenum}.dat").is_file()