mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#2621 rename test.test_support to test.support
This commit is contained in:
parent
6a654814ea
commit
ee8712cda4
358 changed files with 1308 additions and 1307 deletions
|
@ -4,9 +4,9 @@ import poplib
|
|||
import time
|
||||
|
||||
from unittest import TestCase
|
||||
from test import test_support
|
||||
from test import support
|
||||
|
||||
HOST = test_support.HOST
|
||||
HOST = support.HOST
|
||||
|
||||
def server(evt, serv):
|
||||
serv.listen(5)
|
||||
|
@ -27,7 +27,7 @@ class GeneralTests(TestCase):
|
|||
self.evt = threading.Event()
|
||||
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
self.sock.settimeout(3)
|
||||
self.port = test_support.bind_port(self.sock)
|
||||
self.port = support.bind_port(self.sock)
|
||||
threading.Thread(target=server, args=(self.evt,self.sock)).start()
|
||||
time.sleep(.1)
|
||||
|
||||
|
@ -65,7 +65,7 @@ class GeneralTests(TestCase):
|
|||
|
||||
|
||||
def test_main(verbose=None):
|
||||
test_support.run_unittest(GeneralTests)
|
||||
support.run_unittest(GeneralTests)
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue