X Tutup
The Wayback Machine - https://web.archive.org/web/20220607084356/https://github.com/python/cpython/pull/28405
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45229: Remove test_main in many tests #28405

Merged

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 17, 2021

Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.

https://bugs.python.org/issue45229

@serhiy-storchaka serhiy-storchaka changed the title 45229: Remove test_main in many tests bpo-45229: Remove test_main in many tests Sep 17, 2021
@serhiy-storchaka serhiy-storchaka force-pushed the regrtest-no-test-main branch 2 times, most recently from c22388d to a4083e6 Compare Sep 17, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
@serhiy-storchaka serhiy-storchaka marked this pull request as ready for review Sep 17, 2021
@serhiy-storchaka serhiy-storchaka requested a review from vstinner Sep 17, 2021
@serhiy-storchaka serhiy-storchaka added 🔨 test-with-buildbots and removed DO-NOT-MERGE labels Sep 17, 2021
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 17, 2021

🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit dba9b2f 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots label Sep 17, 2021
@brettcannon brettcannon removed their request for review Sep 17, 2021
@serhiy-storchaka serhiy-storchaka merged commit 40348ac into python:main Sep 19, 2021
65 of 76 checks passed
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 19, 2021

Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒🤖

@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 19, 2021

Sorry, @serhiy-storchaka, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 40348acc180580371d25f75f46b27048e35f2435 3.10

@serhiy-storchaka serhiy-storchaka deleted the regrtest-no-test-main branch Sep 19, 2021
@miss-islington
Copy link
Contributor

@miss-islington miss-islington commented Sep 19, 2021

Sorry @serhiy-storchaka, I had trouble checking out the 3.9 backport branch.
Please backport using cherry_picker on command line.
cherry_picker 40348acc180580371d25f75f46b27048e35f2435 3.9

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Sep 19, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests..
(cherry picked from commit 40348ac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 19, 2021

GH-28455 is a backport of this pull request to the 3.10 branch.

serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue Sep 19, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests..
(cherry picked from commit 40348ac)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented Sep 19, 2021

GH-28456 is a backport of this pull request to the 3.9 branch.

serhiy-storchaka added a commit that referenced this issue Sep 19, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
(cherry picked from commit 40348ac)
serhiy-storchaka added a commit that referenced this issue Sep 20, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests..
(cherry picked from commit 40348ac)
nsait-linaro pushed a commit to nsait-linaro/cpython that referenced this issue Sep 21, 2021
Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.

load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed skip news tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants
X Tutup