Skip to content

[Python] Merge small PyROOT pythonization tests to cut process overhead - #22969

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:pyroot-consolidate-pyz-tests
Jul 31, 2026
Merged

guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:pyroot-consolidate-pyz-tests

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

Each test in bindings/pyroot/pythonizations/test runs in its own Python process, so every one pays ~2 s of interpreter startup + import ROOT before a single assertion runs. For the many tiny per-class tests that overhead is essentially the whole runtime.

Merge the small, overhead-bound tests by class family into single modules (unittest discovery picks up all TestCase classes in a file). This takes the directory from 78 to 51 registered tests with no loss of coverage.

Follows up on:

@guitargeek guitargeek added the clean build Ask CI to do non-incremental build on PR label Jul 31, 2026
@guitargeek guitargeek closed this Jul 31, 2026
@guitargeek guitargeek reopened this Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 15h 52m 47s ⏱️
 3 852 tests  3 852 ✅ 0 💤 0 ❌
78 483 runs  78 483 ✅ 0 💤 0 ❌

Results for commit f189142.

♻️ This comment has been updated with latest results.

@guitargeek
guitargeek force-pushed the pyroot-consolidate-pyz-tests branch from c18fd23 to 109c459 Compare July 31, 2026 11:21
Each test in bindings/pyroot/pythonizations/test runs in its own Python
process, so every one pays ~2 s of interpreter startup + import ROOT
before a single assertion runs. For the many tiny per-class tests that
overhead is essentially the whole runtime.

Merge the small, overhead-bound tests by class family into single
modules (unittest discovery picks up all TestCase classes in a file).
This takes the directory from 78 to 51 registered tests with no loss of
coverage.
@guitargeek
guitargeek force-pushed the pyroot-consolidate-pyz-tests branch from 109c459 to f189142 Compare July 31, 2026 12:58
@guitargeek
guitargeek merged commit e234003 into root-project:master Jul 31, 2026
33 of 34 checks passed
@guitargeek
guitargeek deleted the pyroot-consolidate-pyz-tests branch July 31, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants