Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-131178: Add tests forast command-line interface#133329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
sobolevn merged 11 commits intopython:mainfromdonBarbos:issue-131178-ast
May 4, 2025
Merged
Changes from1 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
PrevPrevious commit
NextNext commit
Rename from flags to flag
  • Loading branch information
@donBarbos
donBarbos committedMay 4, 2025
commit21097ebfa5f23bcf295094f200744c090864dd29
14 changes: 7 additions & 7 deletionsLib/test/test_ast/test_ast.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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: ')
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):
Expand DownExpand 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

[8]ページ先頭

©2009-2025 Movatter.jp