mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-127637: add tests for dis
command-line interface (#127759)
This commit is contained in:
parent
5eb7fd4d0f
commit
e85f2f1703
3 changed files with 123 additions and 4 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue