def test_release_port(self):
    serial.ALLOCATED_PORTS.add(('127.0.0.1', 100))
    serial.ALLOCATED_PORTS.add(('127.0.0.2', 100))
    self.assertEqual(2, len(serial.ALLOCATED_PORTS))
    serial.release_port('127.0.0.1', 100)
    self.assertEqual(1, len(serial.ALLOCATED_PORTS))
    serial.release_port('127.0.0.2', 100)
    self.assertEqual(0, len(serial.ALLOCATED_PORTS))
def test_release_port(self):
    serial.ALLOCATED_PORTS.add(('127.0.0.1', 100))
    serial.ALLOCATED_PORTS.add(('127.0.0.2', 100))
    self.assertEqual(2, len(serial.ALLOCATED_PORTS))
    serial.release_port('127.0.0.1', 100)
    self.assertEqual(1, len(serial.ALLOCATED_PORTS))
    serial.release_port('127.0.0.2', 100)
    self.assertEqual(0, len(serial.ALLOCATED_PORTS))