aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_source_encoding.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r--Lib/test/test_source_encoding.py5
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')