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 8bdebc1f3d..f30c1e8630 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -49,9 +49,9 @@ class TestRefactoringTool(unittest.TestCase): def test_print_function_option(self): rt = self.rt({"print_function" : True}) - self.assertTrue(rt.grammar is pygram.python_grammar_no_print_statement) - self.assertTrue(rt.driver.grammar is - pygram.python_grammar_no_print_statement) + self.assertIs(rt.grammar, pygram.python_grammar_no_print_statement) + self.assertIs(rt.driver.grammar, + pygram.python_grammar_no_print_statement) def test_write_unchanged_files_option(self): rt = self.rt() @@ -271,6 +271,10 @@ from __future__ import print_function""" fn = os.path.join(TEST_DATA_DIR, "different_encoding.py") self.check_file_refactoring(fn) + def test_false_file_encoding(self): + fn = os.path.join(TEST_DATA_DIR, "false_encoding.py") + data = self.check_file_refactoring(fn) + def test_bom(self): fn = os.path.join(TEST_DATA_DIR, "bom.py") data = self.check_file_refactoring(fn) |