def testToJythonRegion(self): jr = JRegion(0, 0, 100, 100) pyr = JRegion.toJythonRegion(jr) self.assertEqual(jr.x, pyr.x) self.assertEqual(jr.y, pyr.y) self.assertEqual(jr.w, pyr.w) self.assertEqual(jr.h, pyr.h) try: with jr: self.fail("should not happen: __exit__ is not defined in Java.") except AttributeError,e: pass
def testToJythonRegion(self): jr = JRegion(0, 0, 100, 100) pyr = JRegion.toJythonRegion(jr) self.assertEqual(jr.x, pyr.x) self.assertEqual(jr.y, pyr.y) self.assertEqual(jr.w, pyr.w) self.assertEqual(jr.h, pyr.h) try: with jr: self.fail( "should not happen: __exit__ is not defined in Java.") except AttributeError, e: pass