Skip to content

[pull] main from python:main - #1402

Merged
pull[bot] merged 7 commits into
tj-python:mainfrom
python:main
Aug 23, 2026
Merged

[pull] main from python:main#1402
pull[bot] merged 7 commits into
tj-python:mainfrom
python:main

Conversation

@pull

@pull pull Bot commented Aug 23, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

terryjreedy and others added 7 commits August 23, 2026 01:38
* gh-155648: In IDLE tests, call unittest.main without exit arg

DD bug 73: In idlelib.idle_test, test_xyz.py files should end with

if __name__ == '__main__':
    unittest.main(verbosity=2)

The default exit is True. This need not and should not be added.
5 files add the confusing equivalent exit=2 ("why the weird value?"),

4 files add exit=False. This is nonsensical when there is nothing more to run;
main will immediately exit anyway. When running a test file from an IDLE editor,
this argument has no visible effect. However, a Claude-based
bug finder claims that in other circumstances (such as a program running
the test in a shell), the good test may falsely fail. Even if this is
not true, it can only confuse a reader.

(The only place in idlelib for exit=False is in idlelib/abc.py files where the unittest
is followed by an htest. The default exit=True exits the process, skipping the htest.)

As part of editing the discussion of this in idle_test/htest.py, I clarified other things.
@pull pull Bot locked and limited conversation to collaborators Aug 23, 2026
@pull pull Bot added the ⤵️ pull label Aug 23, 2026
@pull
pull Bot merged commit 1461f04 into tj-python:main Aug 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants