diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-01 21:26:20 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-01 21:31:09 -0300 |
commit | 3c433205280de89d4d7709dfb29426492fdbdbe6 (patch) | |
tree | ffd68b0fefae3ec2a2207380b8f9bfbac5448dc5 /tests/samplebinding/ownership_argument_invalidation_test.py | |
parent | 9fdba4372215c5fe243eacf8ca10ce51904b5d69 (diff) |
Removed all undue usage of lambda with assertRaises on unit tests.
Reviewed by Lauro Neto <lauro.neto@openbossa.org>
Diffstat (limited to 'tests/samplebinding/ownership_argument_invalidation_test.py')
-rwxr-xr-x | tests/samplebinding/ownership_argument_invalidation_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/samplebinding/ownership_argument_invalidation_test.py b/tests/samplebinding/ownership_argument_invalidation_test.py index 6562a287a..8a6aac79c 100755 --- a/tests/samplebinding/ownership_argument_invalidation_test.py +++ b/tests/samplebinding/ownership_argument_invalidation_test.py @@ -38,19 +38,19 @@ class WrapperValidityOfArgumentsTest(unittest.TestCase): '''Call to method using invalidated Python wrapper as argument should raise RuntimeError.''' poly = Polygon() Polygon.stealOwnershipFromPython(poly) - self.assertRaises(RuntimeError, lambda : Polygon.doublePolygonScale(poly)) + self.assertRaises(RuntimeError, Polygon.doublePolygonScale, poly) 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, lambda : Polygon(pt)) + self.assertRaises(RuntimeError, Polygon, pt) 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, lambda : Polygon.doublePolygonScale(pt)) + self.assertRaises(RuntimeError, Polygon.doublePolygonScale, pt) if __name__ == '__main__': unittest.main() |