Skip to content

Commit 53d8e1f

Browse files
tonghuaroothugovk
andauthored
Update Lib/test/test_decimal.py
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 6cac27b commit 53d8e1f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

Lib/test/test_decimal.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6029,10 +6029,22 @@ def test(arith=None, verbose=None, todo_tests=None, debug=None):
60296029

60306030
if __name__ == '__main__':
60316031
import argparse
6032-
parser = argparse.ArgumentParser(usage="test_decimal.py [--debug] [{--skip | test1 [test2 [...]]}]")
6033-
parser.add_argument('--debug', '-d', action='store_true', help='shows the test number and context before each test')
6034-
parser.add_argument('--skip', '-s', action='store_true', help='skip over 90%% of the arithmetic tests')
6035-
parser.add_argument('tests', nargs='*', help='specific tests to run')
6032+
6033+
parser = argparse.ArgumentParser()
6034+
group = parser.add_mutually_exclusive_group()
6035+
group.add_argument("tests", nargs="*", default=[], help="specific tests to run")
6036+
group.add_argument(
6037+
"-s",
6038+
"--skip",
6039+
action="store_true",
6040+
help="skip over 90%% of the arithmetic tests",
6041+
)
6042+
parser.add_argument(
6043+
"-d",
6044+
"--debug",
6045+
action="store_true",
6046+
help="shows the test number and context before each test",
6047+
)
60366048
args = parser.parse_args()
60376049

60386050
if args.skip:

0 commit comments

Comments
 (0)