mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-21448)
This commit is contained in:
parent
bb0424b122
commit
4660597b51
20 changed files with 185 additions and 154 deletions
|
@ -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'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue