summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bdb.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-09-20 06:34:52 (GMT)
committerGitHub <noreply@github.com>2021-09-20 06:34:52 (GMT)
commit5822ab672a1d26ff1837103c1ed8e4c3c2a42b87 (patch)
tree940df51015f39fafdef1287e646c406025c6cc83 /Lib/test/test_bdb.py
parent41e2a31c13ba73e2c30e9bf0be9417fd17e8ace2 (diff)
downloadcpython-5822ab672a1d26ff1837103c1ed8e4c3c2a42b87.zip
cpython-5822ab672a1d26ff1837103c1ed8e4c3c2a42b87.tar.gz
cpython-5822ab672a1d26ff1837103c1ed8e4c3c2a42b87.tar.bz2
[3.9] bpo-45229: Remove test_main in many tests (GH-28405) (GH-28456)
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 40348acc180580371d25f75f46b27048e35f2435)
Diffstat (limited to 'Lib/test/test_bdb.py')
-rw-r--r--Lib/test/test_bdb.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py
index ae16880..405f741 100644
--- a/Lib/test/test_bdb.py
+++ b/Lib/test/test_bdb.py
@@ -1149,13 +1149,6 @@ class IssuesTestCase(BaseTestCase):
with TracerRun(self) as tracer:
tracer.runcall(tfunc_import)
-def test_main():
- test.support.run_unittest(
- StateTestCase,
- RunTestCase,
- BreakpointTestCase,
- IssuesTestCase,
- )
if __name__ == "__main__":
- test_main()
+ unittest.main()