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)
Exemple #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)
Exemple #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)
Exemple #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)