summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tokenize.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-08-03 16:49:18 (GMT)
committerGitHub <noreply@github.com>2020-08-03 16:49:18 (GMT)
commit4660597b51b3d14ce6269d0ed865ab7e22c6ae1f (patch)
tree00ab23106abb1d0023e261685dc4f2077002aabd /Lib/test/test_tokenize.py
parentbb0424b122e3d222a558bd4177ce37befd3e0347 (diff)
downloadcpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.zip
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.gz
cpython-4660597b51b3d14ce6269d0ed865ab7e22c6ae1f.tar.bz2
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
Diffstat (limited to 'Lib/test/test_tokenize.py')
-rw-r--r--Lib/test/test_tokenize.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index 6de7aa8..681f2c7 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -1,4 +1,5 @@
from test import support
+from test.support import os_helper
from tokenize import (tokenize, _tokenize, untokenize, NUMBER, NAME, OP,
STRING, ENDMARKER, ENCODING, tok_name, detect_encoding,
open as tokenize_open, Untokenizer, generate_tokens,
@@ -1265,8 +1266,8 @@ class TestDetectEncoding(TestCase):
self.assertEqual(consumed_lines, [b'print("#coding=fake")'])
def test_open(self):
- filename = support.TESTFN + '.py'
- self.addCleanup(support.unlink, filename)
+ filename = os_helper.TESTFN + '.py'
+ self.addCleanup(os_helper.unlink, filename)
# test coding cookie
for encoding in ('iso-8859-15', 'utf-8'):