def testInvalidArgumentWithImplicitConversion(self):
     '''Call to method using invalidated Python wrapper to be implicitly converted should raise RuntimeError.'''
     pt = Point(1, 2)
     Polygon.stealOwnershipFromPython(pt)
     self.assertRaises(RuntimeError, Polygon.doublePolygonScale, pt)
 def testInvalidArgumentToConstructor(self):
     '''Call to constructor using invalidated Python wrapper as argument should raise RuntimeError.'''
     pt = Point(1, 2)
     Polygon.stealOwnershipFromPython(pt)
     self.assertRaises(RuntimeError, Polygon, pt)
 def testInvalidArgumentToMethod(self):
     '''Call to method using invalidated Python wrapper as argument should raise RuntimeError.'''
     poly = Polygon()
     Polygon.stealOwnershipFromPython(poly)
     self.assertRaises(RuntimeError, Polygon.doublePolygonScale, poly)
예제 #4
0
 def testInvalidArgumentWithImplicitConversion(self):
     '''Call to method using invalidated Python wrapper to be implicitly converted should raise RuntimeError.'''
     pt = Point(1, 2)
     Polygon.stealOwnershipFromPython(pt)
     self.assertRaises(RuntimeError, Polygon.doublePolygonScale, pt)
예제 #5
0
 def testInvalidArgumentToConstructor(self):
     '''Call to constructor using invalidated Python wrapper as argument should raise RuntimeError.'''
     pt = Point(1, 2)
     Polygon.stealOwnershipFromPython(pt)
     self.assertRaises(RuntimeError, Polygon, pt)
예제 #6
0
 def testInvalidArgumentToMethod(self):
     '''Call to method using invalidated Python wrapper as argument should raise RuntimeError.'''
     poly = Polygon()
     Polygon.stealOwnershipFromPython(poly)
     self.assertRaises(RuntimeError, Polygon.doublePolygonScale, poly)