Пример #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))