diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-16 23:51:56 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-09-16 23:51:56 +0300 |
commit | 275c691bf116de51bd87f1ae27a3215fba4d93a2 (patch) | |
tree | 8ecd07ed2ace779d0797886d3f6cb464c058e16f /Lib/lib2to3/tests/test_refactor.py | |
parent | 4c7047cb5e11f8a8fe5ca427d8bcd40d65dfabb8 (diff) | |
download | cpython-275c691bf116de51bd87f1ae27a3215fba4d93a2.tar.gz |
Issue #18873: The tokenize module, IDLE, 2to3, and the findnocoding.py script
now detect Python source code encoding only in comment lines.
Diffstat (limited to 'Lib/lib2to3/tests/test_refactor.py')
-rw-r--r-- | Lib/lib2to3/tests/test_refactor.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/lib2to3/tests/test_refactor.py b/Lib/lib2to3/tests/test_refactor.py index 8bdebc1f3d..5ecd9b1cb3 100644 --- a/Lib/lib2to3/tests/test_refactor.py +++ b/Lib/lib2to3/tests/test_refactor.py @@ -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) |