summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-05-20 21:35:26 (GMT)
committerBenjamin Peterson <benjamin@python.org>2008-05-20 21:35:26 (GMT)
commitee8712cda46338d223509cc5751fd36509ad3860 (patch)
treebb9d363b4276566415457980472001c7e3ec2bed /Lib/test/test_socket.py
parent6a654814ea3f3a918935762ffdcd33ae98e00278 (diff)
downloadcpython-ee8712cda46338d223509cc5751fd36509ad3860.zip
cpython-ee8712cda46338d223509cc5751fd36509ad3860.tar.gz
cpython-ee8712cda46338d223509cc5751fd36509ad3860.tar.bz2
#2621 rename test.test_support to test.support
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index ab860dd..349548f 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
import unittest
-from test import test_support
+from test import support
import errno
import socket
@@ -16,14 +16,14 @@ import array
from weakref import proxy
import signal
-HOST = test_support.HOST
+HOST = support.HOST
MSG = b'Michael Gilfix was here\n'
class SocketTCPTest(unittest.TestCase):
def setUp(self):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
- self.port = test_support.bind_port(self.serv)
+ self.port = support.bind_port(self.serv)
self.serv.listen(1)
def tearDown(self):
@@ -34,7 +34,7 @@ class SocketUDPTest(unittest.TestCase):
def setUp(self):
self.serv = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- self.port = test_support.bind_port(self.serv)
+ self.port = support.bind_port(self.serv)
def tearDown(self):
self.serv.close()
@@ -898,7 +898,7 @@ class BasicTCPTest2(NetworkConnectionTest, BasicTCPTest):
class NetworkConnectionNoServer(unittest.TestCase):
def testWithoutServer(self):
- port = test_support.find_unused_port()
+ port = support.find_unused_port()
self.failUnlessRaises(
socket.error,
lambda: socket.create_connection((HOST, port))
@@ -1145,7 +1145,7 @@ def isTipcAvailable():
for line in f:
if line.startswith("tipc "):
return True
- if test_support.verbose:
+ if support.verbose:
print("TIPC module is not loaded, please 'sudo modprobe tipc'")
return False
@@ -1229,9 +1229,9 @@ def test_main():
tests.append(TIPCTest)
tests.append(TIPCThreadableTest)
- thread_info = test_support.threading_setup()
- test_support.run_unittest(*tests)
- test_support.threading_cleanup(*thread_info)
+ thread_info = support.threading_setup()
+ support.run_unittest(*tests)
+ support.threading_cleanup(*thread_info)
if __name__ == "__main__":
test_main()