From 1110c5bc828218086f6397ec05a9312fb73ea30a Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 12 Sep 2023 09:37:42 +0300 Subject: gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265) --- Lib/test/test_source_encoding.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Lib/test/test_source_encoding.py') diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py index 72c2b47779e..27871378f1c 100644 --- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -68,6 +68,7 @@ class MiscSourceEncodingTest(unittest.TestCase): def test_20731(self): sub = subprocess.Popen([sys.executable, os.path.join(os.path.dirname(__file__), + 'tokenizedata', 'coding20731.py')], stderr=subprocess.PIPE) err = sub.communicate()[1] @@ -100,10 +101,10 @@ class MiscSourceEncodingTest(unittest.TestCase): self.verify_bad_module(module_name) def verify_bad_module(self, module_name): - self.assertRaises(SyntaxError, __import__, 'test.' + module_name) + self.assertRaises(SyntaxError, __import__, 'test.tokenizedata.' + module_name) path = os.path.dirname(__file__) - filename = os.path.join(path, module_name + '.py') + filename = os.path.join(path, 'tokenizedata', module_name + '.py') with open(filename, "rb") as fp: bytes = fp.read() self.assertRaises(SyntaxError, compile, bytes, filename, 'exec') -- cgit v1.2.3