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>
This commit is contained in:
Carlos Damazio 2022-03-16 23:41:02 -03:00 committed by GitHub
parent 30b5d41fab
commit 7c353b7594
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -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: