diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-09-12 09:37:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 09:37:42 +0300 |
commit | 1110c5bc828218086f6397ec05a9312fb73ea30a (patch) | |
tree | e552ff4258e48bb6131e3b2cc2f8b397ee3e4cc0 /Lib/test/test_source_encoding.py | |
parent | 8c813faf864ac1d788a3efc45b4e76c1c3c3b340 (diff) | |
download | cpython-1110c5bc828218086f6397ec05a9312fb73ea30a.tar.gz cpython-1110c5bc828218086f6397ec05a9312fb73ea30a.zip |
gh-108303: Move tokenize-related data to Lib/test/tokenizedata (GH-109265)
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r-- | Lib/test/test_source_encoding.py | 5 |
1 files changed, 3 insertions, 2 deletions
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') |