示例#1
0
 def testSingletonTupleRaises(self):
     with self.assertRaises(ValueError):
         features._to_point((32, ))
示例#2
0
 def testThreeTupleRaises(self):
     with self.assertRaises(ValueError):
         features._to_point((32, 32, 32))
示例#3
0
 def testNoneAsSecondElementOfTupleRaises(self):
     with self.assertRaises(TypeError):
         features._to_point((32, None))
示例#4
0
 def testNoneAsFirstElementOfTupleRaises(self):
     with self.assertRaises(TypeError):
         features._to_point((None, 32))
示例#5
0
 def testNoneInputReturnsNoneOutput(self):
     with self.assertRaises(AssertionError):
         features._to_point(None)
示例#6
0
 def testIntStringTwoTuple(self):
     value = features._to_point(("32", 64))
     self.assertEqual(value, point.Point(32, 64))
示例#7
0
 def testIntAsString(self):
     value = features._to_point("32")
     self.assertEqual(value, point.Point(32, 32))