mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
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:
parent
30b5d41fab
commit
7c353b7594
2 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue