summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_asyncio/test_sendfile.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-06-25 12:15:40 (GMT)
committerGitHub <noreply@github.com>2020-06-25 12:15:40 (GMT)
commit06a40d735939fd7d5cb77a68a6e18299b6484fa5 (patch)
tree1d830596f995942fb2b6088002cab6ebcb0aee0d /Lib/test/test_asyncio/test_sendfile.py
parent91698d8caa4b5bb6e8dbb64b156e8afe9e32cac1 (diff)
downloadcpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.zip
cpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.tar.gz
cpython-06a40d735939fd7d5cb77a68a6e18299b6484fa5.tar.bz2
bpo-40275: Use new test.support helper submodules in tests (GH-20824)
Diffstat (limited to 'Lib/test/test_asyncio/test_sendfile.py')
-rw-r--r--Lib/test/test_asyncio/test_sendfile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_asyncio/test_sendfile.py b/Lib/test/test_asyncio/test_sendfile.py
index dbce199..a30d9b9 100644
--- a/Lib/test/test_asyncio/test_sendfile.py
+++ b/Lib/test/test_asyncio/test_sendfile.py
@@ -10,6 +10,7 @@ from asyncio import base_events
from asyncio import constants
from unittest import mock
from test import support
+from test.support import os_helper
from test.support import socket_helper
from test.test_asyncio import utils as test_utils
@@ -98,17 +99,17 @@ class SendfileBase:
@classmethod
def setUpClass(cls):
- with open(support.TESTFN, 'wb') as fp:
+ with open(os_helper.TESTFN, 'wb') as fp:
fp.write(cls.DATA)
super().setUpClass()
@classmethod
def tearDownClass(cls):
- support.unlink(support.TESTFN)
+ os_helper.unlink(os_helper.TESTFN)
super().tearDownClass()
def setUp(self):
- self.file = open(support.TESTFN, 'rb')
+ self.file = open(os_helper.TESTFN, 'rb')
self.addCleanup(self.file.close)
self.loop = self.create_event_loop()
self.set_event_loop(self.loop)