Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.3k
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
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
198c87a
bc12715
75d3cb7
de328af
6aa5cd7
b804f61
21097eb
42ff309
ac71310
9f6f5b2
361706a
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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(flag=flag): | ||
with self.assertRaises(SystemExit): | ||
output = self.invoke_ast(flag) | ||
self.assertStartsWith(output, 'usage: ') | ||
donBarbos marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@@ -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(flag=flag): | ||
self.check_output(source, expect, flag) | ||
def test_single_mode_flag(self): | ||
@@ -3270,7 +3270,7 @@ def test_single_mode_flag(self): | ||
Pass()]) | ||
''' | ||
for flag in ('-m=single', '--mode=single'): | ||
with self.subTest(flag=flag): | ||
self.check_output(source, expect, flag) | ||
def test_eval_mode_flag(self): | ||
@@ -3286,7 +3286,7 @@ def test_eval_mode_flag(self): | ||
Constant(value=3)])) | ||
''' | ||
for flag in ('-m=eval', '--mode=eval'): | ||
with self.subTest(flag=flag): | ||
self.check_output(source, expect, flag) | ||
def test_func_type_mode_flag(self): | ||
@@ -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(flag=flag): | ||
self.check_output(source, expect, flag) | ||
def test_no_type_comments_flag(self): | ||
sobolevn marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
@@ -3333,7 +3333,7 @@ def test_include_attributes_flag(self): | ||
end_col_offset=4)]) | ||
''' | ||
for flag in ('-a', '--include-attributes'): | ||
with self.subTest(flag=flag): | ||
self.check_output(source, expect, flag) | ||
def test_indent_flag(self): | ||
@@ -3345,7 +3345,7 @@ def test_indent_flag(self): | ||
Pass()]) | ||
''' | ||
for flag in ('-i=0', '--indent=0'): | ||
with self.subTest(flag=flag): | ||
self.check_output(source, expect, flag) | ||
Uh oh!
There was an error while loading.Please reload this page.