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
Prev Previous commit
Next Next commit
Rename from flags to flag
  • Loading branch information
donbarbos committed May 4, 2025
commit 21097ebfa5f23bcf295094f200744c090864dd29
14 changes: 7 additions & 7 deletions Lib/test/test_ast/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,7 @@ def test_unknown_flag(self):
def test_help_flag(self):
# test 'python -m ast -h/--help'
for flag in ('-h', '--help'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
with self.assertRaises(SystemExit):
output = self.invoke_ast(flag)
self.assertStartsWith(output, 'usage: ')
Comment thread
donbarbos marked this conversation as resolved.
Outdated
Expand All @@ -3258,7 +3258,7 @@ def test_exec_mode_flag(self):
TypeIgnore(lineno=1, tag='[assignment]')])
'''
for flag in ('-m=exec', '--mode=exec'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)

def test_single_mode_flag(self):
Expand All @@ -3270,7 +3270,7 @@ def test_single_mode_flag(self):
Pass()])
'''
for flag in ('-m=single', '--mode=single'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)

def test_eval_mode_flag(self):
Expand All @@ -3286,7 +3286,7 @@ def test_eval_mode_flag(self):
Constant(value=3)]))
'''
for flag in ('-m=eval', '--mode=eval'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)

def test_func_type_mode_flag(self):
Expand All @@ -3303,7 +3303,7 @@ def test_func_type_mode_flag(self):
ctx=Load()))
'''
for flag in ('-m=func_type', '--mode=func_type'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)

def test_no_type_comments_flag(self):
Comment thread
sobolevn marked this conversation as resolved.
Expand Down Expand Up @@ -3333,7 +3333,7 @@ def test_include_attributes_flag(self):
end_col_offset=4)])
'''
for flag in ('-a', '--include-attributes'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)

def test_indent_flag(self):
Expand All @@ -3345,7 +3345,7 @@ def test_indent_flag(self):
Pass()])
'''
for flag in ('-i=0', '--indent=0'):
with self.subTest(flags=flag):
with self.subTest(flag=flag):
self.check_output(source, expect, flag)


Expand Down
Loading