def test_is_not_valid_port_str(self): self.assertFalse(pgtest.is_valid_port('1234'))
def test_is_not_valid_port_neg(self): self.assertFalse(pgtest.is_valid_port(-1))
def test_is_not_valid_port_too_high(self): for u in range(65535, 100000): self.assertFalse(pgtest.is_valid_port(u))
def test_is_not_valid_port_too_low(self): for l in range(1024): self.assertFalse(pgtest.is_valid_port(l))
def test_is_valid_port(self): for i in range(1025, 65534): self.assertTrue(pgtest.is_valid_port(i))
def test_port_valid(self): self.assertTrue(pgtest.is_valid_port(self.pg.port))