def createTestSocket(test, addressFamily, socketType):
    skt = socket.socket(addressFamily, socketType)
    test.addCleanup(skt.close)
    return skt
Create a socket for the duration of the given test.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/internet/test/test_tcp.py/createTestSocket