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) 2017-present 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"""Framework unit tests7Unit tests for the test framework.8"""10import sys11import unittest13from test_framework.test_framework import TEST_EXIT_PASSED, TEST_EXIT_FAILED15# List of framework modules containing unit tests. Should be kept in sync with16# the output of `git grep unittest.TestCase ./test/functional/test_framework`17TEST_FRAMEWORK_MODULES = [18"address",19"crypto.bip324_cipher",20"blocktools",21"compressor",22"crypto.chacha20",23"crypto.ellswift",24"extendedkey",25"key",26"messages",27"crypto.muhash",28"crypto.poly1305",29"crypto.ripemd160",30"crypto.secp256k1",31"crypto.siphash",32"script",33"script_util",34"segwit_addr",35"wallet_util",36]39def run_unit_tests():40test_framework_tests = unittest.TestSuite()41for module in TEST_FRAMEWORK_MODULES:42test_framework_tests.addTest(43unittest.TestLoader().loadTestsFromName(f"test_framework.{module}")44)45result = unittest.TextTestRunner(stream=sys.stdout, verbosity=1, failfast=True).run(46test_framework_tests47)48if not result.wasSuccessful():49sys.exit(TEST_EXIT_FAILED)50sys.exit(TEST_EXIT_PASSED)53if __name__ == "__main__":54run_unit_tests()
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.