def test_isValidHeight_topEdge(self): self.assertTrue(passport.isValidHeight("193cm"), "Top edge inner") self.assertEqual(False, passport.isValidHeight("194cm"), "Top edge outer") self.assertTrue(passport.isValidHeight("76in"), "Top edge inner") self.assertEqual(False, passport.isValidHeight("77in"), "Top edge outer")
def test_isValidHeight_bottomEdge(self): self.assertTrue(passport.isValidHeight("150cm"), "Bottom edge inner") self.assertEqual(False, passport.isValidHeight("149cm"), "Bottom edge outer") self.assertTrue(passport.isValidHeight("59in"), "Bottom edge inner") self.assertEqual(False, passport.isValidHeight("58in"), "Bottom edge outer")
def test_isValidHeight_noUnits3digit(self): self.assertEqual(False, passport.isValidHeight("190"))
def test_isValidHeight_knownGood_in(self): self.assertTrue(passport.isValidHeight("60in"))
def test_isValidHeight_knownGood_cm(self): self.assertTrue(passport.isValidHeight("190cm"))
def test_isValidHeight_knownBad_in(self): self.assertEqual(False, passport.isValidHeight("190in"))