'Each LiveServerTestCase binds to a unique port or fails to start a
server thread when run concurrently (#26011).'

def test_port_bind(self):

    TestCase = type('TestCase', (LiveServerBase,), {})
    try:
        TestCase.setUpClass()
    except socket.error as e:
        if (e.errno == errno.EADDRINUSE):
            return
        raise
    try:
        self.assertNotEqual(self.live_server_url, TestCase.live_server_url, ('Acquired    duplicate    server    addresses    for    server    threads:    %s' % self.live_server_url))
    finally:
        if hasattr(TestCase, 'server_thread'):
            TestCase.server_thread.terminate()
