test: Fix Python compatibility issues in test framework #34218

pull tboy1337 wants to merge 2 commits into bitcoin:master from tboy1337:test-framework-fixes changing 1 files +7 −2
  1. tboy1337 commented at 8:16 am on January 7, 2026: none

    This PR addresses cross-platform compatibility issues in the Bitcoin Core test framework:

    Changes

    • Windows compatibility: Add proper error handling for os.geteuid() in skip_if_no_bpf_permissions() method, which doesn’t exist on Windows systems
    • Consistent return behavior: Fix inconsistent return statements in inspect_sqlite_db() method to ensure proper error handling when sqlite3 is unavailable

    Testing

    • Verified the test framework compiles successfully on both Windows and Unix-like systems
    • Confirmed pylint score improved from 6.67/10 to 6.75/10
    • No impact on existing test functionality

    Motivation

    These fixes ensure the test framework works correctly across all supported platforms (Windows, macOS, Linux) and improve error handling robustness.

  2. test: Fix Python issues in test framework
    - Add Windows compatibility for BPF permissions check by handling missing os.geteuid()
    - Fix inconsistent return statements in inspect_sqlite_db method
    c6fe7e24a0
  3. DrahtBot added the label Tests on Jan 7, 2026
  4. DrahtBot commented at 8:17 am on January 7, 2026: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34218.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    LLM Linter (✨ experimental)

    Possible typos and grammar issues:

    • permissions -> permission [Use singular “permission” in “no permission to use BPF” for correct English and clearer comprehension.]

    2026-01-07

  5. test: Ensure newline at end of file in test framework
    - Added a newline at the end of the file in test_framework.py to comply with PEP 8 standards and prevent potential issues in file handling.
    da355cd185
  6. fanquake closed this on Jan 7, 2026

  7. tboy1337 deleted the branch on Jan 7, 2026


tboy1337 DrahtBot

Labels
Tests


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-01-12 00:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me