summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib/source
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-03-20 21:36:29 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-03-20 21:36:29 (GMT)
commite431d3c9aadb52dd1eea4d1e606e94f1c8471459 (patch)
tree5154063f2e6048881fa88675efd6dfb4bd2f5c4f /Lib/test/test_importlib/source
parent97eee1cfda602df25866a6a62796f675caf52323 (diff)
downloadcpython-e431d3c9aadb52dd1eea4d1e606e94f1c8471459.zip
cpython-e431d3c9aadb52dd1eea4d1e606e94f1c8471459.tar.gz
cpython-e431d3c9aadb52dd1eea4d1e606e94f1c8471459.tar.bz2
Issue #26581: Use the first coding cookie on a line, not the last one.
Diffstat (limited to 'Lib/test/test_importlib/source')
-rw-r--r--Lib/test/test_importlib/source/test_source_encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/source/test_source_encoding.py b/Lib/test/test_importlib/source/test_source_encoding.py
index b604afb..1e0771b 100644
--- a/Lib/test/test_importlib/source/test_source_encoding.py
+++ b/Lib/test/test_importlib/source/test_source_encoding.py
@@ -14,7 +14,7 @@ import unittest
import warnings
-CODING_RE = re.compile(r'^[ \t\f]*#.*coding[:=][ \t]*([-\w.]+)', re.ASCII)
+CODING_RE = re.compile(r'^[ \t\f]*#.*?coding[:=][ \t]*([-\w.]+)', re.ASCII)
class EncodingTest: