mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-15 18:17:43 +02:00
3fd68a95e6scripted-diff: replace remaining Python test equality asserts (Lőrinc)301b1d7b1ftest: add missing `assert_equal` imports (Lőrinc)06a4176c42test: convert truthy asserts in `wallet_miniscript` and `rpc_psbt` (Lőrinc)d9a3cf20a4test: convert simple equality asserts in excluded files (Lőrinc)23c06d4e6dtest: convert equality asserts with comments or special chars (Lőrinc)dcd90fbe54test: prep manual equality assert conversions (Lőrinc)4f4516e3f6test: split equality asserts joined by `and` (Lőrinc)76a5570b36test: use `in` for two-value equality asserts (Lőrinc) Pull request description: ### Problem Plain `assert x == y` is a poor fit for this test framework, `assert_equal()` gives more useful failure output and keeps equality checks consistent with the rest of the functional tests. ### Design A simple scripted diff cannot safely rewrite all of them because many files use `==` inside larger expressions, such as chained conditions, comprehensions, and other compound assertions. That makes a one-shot mechanical conversion either incorrect or harder to review. ### Fix This series first rewrites the non-mechanical cases into standalone assertions so patterns are easier to identify, then applies a scripted diff to the remaining cases that are safe to convert mechanically. Partially fixes https://github.com/bitcoin/bitcoin/issues/23119 by adjusting the `==` case only (which is similar to the `BOOST` alternatives so it's expected to be uncontroversial). ACKs for top commit: maflcko: review ACK3fd68a95e6🚆 rkrux: lgtm ACK3fd68a95e6theStack: ACK3fd68a95e6Tree-SHA512: 6950ffa044db72d6235305f4c0247254e7e8f57ee1c8300e553953963914a6360ca71569fe315ecb333cf0e62f78b3a24603717f64229783761f8c1b5958fc12