mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
bpo-40275: Use new test.support helper submodules in tests (GH-20824)
This commit is contained in:
parent
91698d8caa
commit
06a40d7359
9 changed files with 29 additions and 21 deletions
|
@ -14,7 +14,7 @@ import tempfile
|
|||
import threading
|
||||
import unittest
|
||||
from unittest import mock
|
||||
from test import support
|
||||
from test.support import os_helper
|
||||
from test.support import socket_helper
|
||||
|
||||
if sys.platform == 'win32':
|
||||
|
@ -467,19 +467,19 @@ class SelectorEventLoopUnixSockSendfileTests(test_utils.TestCase):
|
|||
|
||||
@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.loop = asyncio.new_event_loop()
|
||||
self.set_event_loop(self.loop)
|
||||
self.file = open(support.TESTFN, 'rb')
|
||||
self.file = open(os_helper.TESTFN, 'rb')
|
||||
self.addCleanup(self.file.close)
|
||||
super().setUp()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue