Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1#!/usr/bin/env python32# Copyright (c) The Bitcoin Core developers3# Distributed under the MIT software license, see the accompanying4# file COPYING or http://www.opensource.org/licenses/mit-license.php.5"""Test that bitcoin-gui starts up and can be stopped via RPC."""7import platform9from test_framework.test_framework import (10BitcoinTestFramework,11SkipTest,12)15class GuiTest(BitcoinTestFramework):16def set_test_params(self):17self.num_nodes = 118self.extra_args = [["-server"]]20def skip_test_if_missing_module(self):21self.skip_if_no_gui()22# On Windows, bitcoin.exe exits immediately when launching bitcoin-gui.exe,23# causing the test framework's process monitor to see a premature node exit.24# This issue is likely fixable.25if platform.system() == "Windows":26raise SkipTest("bitcoin-gui test not supported on Windows")28def setup_nodes(self):29self.extra_init = [{"use_gui": True}]30super().setup_nodes()32def run_test(self):33self.log.info("Test that bitcoin-gui starts up and can be stopped via RPC")34self.stop_node(0)37if __name__ == "__main__":38GuiTest(__file__).main()
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.