summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/main.py
diff options
context:
space:
mode:
authorCarlos Damazio <carlos.damazio@damazio.dev>2022-03-17 02:41:02 (GMT)
committerGitHub <noreply@github.com>2022-03-17 02:41:02 (GMT)
commit7c353b7594545fb9403b3123a17ad06cadc2f73d (patch)
tree832326d7e0fbd9524886f82d3c3acc51a4d19198 /Lib/unittest/main.py
parent30b5d41fabad04f9f34d603f1ce2249452c18c71 (diff)
downloadcpython-7c353b7594545fb9403b3123a17ad06cadc2f73d.zip
cpython-7c353b7594545fb9403b3123a17ad06cadc2f73d.tar.gz
cpython-7c353b7594545fb9403b3123a17ad06cadc2f73d.tar.bz2
bpo-22859: deprecate unittest.main.TestProgram.usageExit (GH-30293)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Lib/unittest/main.py')
-rw-r--r--Lib/unittest/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py
index e62469a..cb8f1f3 100644
--- a/Lib/unittest/main.py
+++ b/Lib/unittest/main.py
@@ -3,6 +3,7 @@
import sys
import argparse
import os
+import warnings
from . import loader, runner
from .signals import installHandler
@@ -101,6 +102,8 @@ class TestProgram(object):
self.runTests()
def usageExit(self, msg=None):
+ warnings.warn("TestProgram.usageExit() is deprecated and will be"
+ " removed in Python 3.13", DeprecationWarning)
if msg:
print(msg)
if self._discovery_parser is None: