Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2462,7 +2462,7 @@ def check_output(self, source, expect, *flags):
expect = self.text_normalize(expect)
self.assertListEqual(res.splitlines(), expect.splitlines())

def test_invokation(self):
def test_invocation(self):
# test various combinations of parameters
base_flags = [
('-C', '--show-caches'),
Expand All @@ -2483,6 +2483,11 @@ def f():
with self.subTest(args=args[1:]):
_ = self.invoke_dis(*args)

with self.assertRaises(SystemExit):
# suppress argparse error message
with contextlib.redirect_stderr(io.StringIO()):
_ = self.invoke_dis('--unknown')

def test_show_cache(self):
# test 'python -m dis -C/--show-caches'
source = 'print()'
Expand Down
Loading