예제 #1
0
 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")
예제 #2
0
 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")
예제 #3
0
 def test_isValidHeight_noUnits3digit(self):
     self.assertEqual(False, passport.isValidHeight("190"))
예제 #4
0
 def test_isValidHeight_knownGood_in(self):
     self.assertTrue(passport.isValidHeight("60in"))
예제 #5
0
 def test_isValidHeight_knownGood_cm(self):
     self.assertTrue(passport.isValidHeight("190cm"))
예제 #6
0
 def test_isValidHeight_knownBad_in(self):
     self.assertEqual(False, passport.isValidHeight("190in"))