gh-127637: add tests for dis command-line interface (#127759)

This commit is contained in:
Bénédikt Tran 2024-12-09 19:02:22 +01:00 committed by GitHub
parent 5eb7fd4d0f
commit e85f2f1703
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 123 additions and 4 deletions

View file

@ -1115,7 +1115,7 @@ class Bytecode:
return output.getvalue()
def main():
def main(args=None):
import argparse
parser = argparse.ArgumentParser()
@ -1128,7 +1128,7 @@ def main():
parser.add_argument('-S', '--specialized', action='store_true',
help='show specialized bytecode')
parser.add_argument('infile', nargs='?', default='-')
args = parser.parse_args()
args = parser.parse_args(args=args)
if args.infile == '-':
name = '<stdin>'
source = sys.stdin.buffer.read()