mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-39313: Add an option to RefactoringTool for using exec as a function (GH-17967)
https://bugs.python.org/issue39313 Automerge-Triggered-By: @pablogsal
This commit is contained in:
parent
14dbe4b3f0
commit
61b14151cc
5 changed files with 23 additions and 8 deletions
|
@ -44,9 +44,13 @@ class TestRefactoringTool(unittest.TestCase):
|
|||
|
||||
def test_print_function_option(self):
|
||||
rt = self.rt({"print_function" : True})
|
||||
self.assertIs(rt.grammar, pygram.python_grammar_no_print_statement)
|
||||
self.assertIs(rt.driver.grammar,
|
||||
pygram.python_grammar_no_print_statement)
|
||||
self.assertNotIn("print", rt.grammar.keywords)
|
||||
self.assertNotIn("print", rt.driver.grammar.keywords)
|
||||
|
||||
def test_exec_function_option(self):
|
||||
rt = self.rt({"exec_function" : True})
|
||||
self.assertNotIn("exec", rt.grammar.keywords)
|
||||
self.assertNotIn("exec", rt.driver.grammar.keywords)
|
||||
|
||||
def test_write_unchanged_files_option(self):
|
||||
rt = self.rt()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue