bpo-40275: Use new test.support helper submodules in tests (GH-21743)
diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
index 28680aa..773101c 100644
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -1,5 +1,6 @@
import unittest
from test import support
+from test.support import os_helper
from test.support import socket_helper
import contextlib
@@ -162,7 +163,7 @@
try:
yield file_location, info
finally:
- support.unlink(file_location)
+ os_helper.unlink(file_location)
def test_basic(self):
# Test basic functionality.
@@ -176,8 +177,8 @@
def test_specified_path(self):
# Make sure that specifying the location of the file to write to works.
with self.urlretrieve(self.logo,
- support.TESTFN) as (file_location, info):
- self.assertEqual(file_location, support.TESTFN)
+ os_helper.TESTFN) as (file_location, info):
+ self.assertEqual(file_location, os_helper.TESTFN)
self.assertTrue(os.path.exists(file_location))
with open(file_location, 'rb') as f:
self.assertTrue(f.read(), "reading from temporary file failed")