Skip to content
6 changes: 6 additions & 0 deletions Lib/test/test_modulefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,12 @@ def test_replace_paths(self):
expected = "co_filename %r changed to %r" % (old_path, new_path)
self.assertIn(expected, output)

def test_encoding(self):
os.makedirs(TEST_DIR, exist_ok=True)
with open(os.path.join(TEST_DIR,'a.py'), 'w', encoding='cp1252') as f:
f.write('# -*- coding: cp1252 -*-\nx = "€"\n')
self._do_test(["a", ["a"], [], [], ""])

def test_extended_opargs(self):
extended_opargs_test = [
"a",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix :mod:`modulefinder` to handle :pep:`263` encoding markers - by Luciana Marques