diff options
Diffstat (limited to 'Lib/lib2to3/tests/test_refactor.py')
| -rw-r--r-- | Lib/lib2to3/tests/test_refactor.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py index 9e3b8fb..be70567 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -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() |
