GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — gh-155648: In IDLE tests, call unittest.main without exit arg by terryjreedy · Pull Request #156249 · python/cpython Conversation
|
|
Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-156251 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-156252 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-156253 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-156249) (#156253) gh-155648: In IDLE tests, call unittest.main without exit arg (GH-156249) * 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. (cherry picked from commit c20318b) Co-authored-by: Terry Jan Reedy <[email protected]>
…H-156249) (#156252) gh-155648: In IDLE tests, call unittest.main without exit arg (GH-156249) * 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. (cherry picked from commit c20318b) Co-authored-by: Terry Jan Reedy <[email protected]>
…H-156249) (#156251) DevDanzin 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. (cherry picked from commit c20318b) Co-authored-by: Terry Jan Reedy <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.