summaryrefslogtreecommitdiffstats
path: root/Lib/dis.py
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2024-12-09 18:02:22 (GMT)
committerGitHub <noreply@github.com>2024-12-09 18:02:22 (GMT)
commite85f2f1703e0f79cfd0d0e3010190b71c0eb18da (patch)
tree1cbb1de4bf4ea317c86bde63e59940b6f424ae54 /Lib/dis.py
parent5eb7fd4d0fc37b91058086181afebec41e66e5ad (diff)
downloadcpython-e85f2f1703e0f79cfd0d0e3010190b71c0eb18da.zip
cpython-e85f2f1703e0f79cfd0d0e3010190b71c0eb18da.tar.gz
cpython-e85f2f1703e0f79cfd0d0e3010190b71c0eb18da.tar.bz2
gh-127637: add tests for `dis` command-line interface (#127759)
Diffstat (limited to 'Lib/dis.py')
-rw-r--r--Lib/dis.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/dis.py b/Lib/dis.py
index 6b3e9ef..aa22404 100644
--- a/Lib/dis.py
+++ b/Lib/dis.py
@@ -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()