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