Пример #1
0
 def test_on_the_fly_compilation(self):
     # http://py4j.sourceforge.net/
     # make sure that com.bru.workshop.Application is running
     from py4j.java_gateway import JavaGateway
     app = JavaGateway().entry_point
     value = app.compileAndExecute('Test',''' public class Test {
                                         public static Object execute(){
                                             return "success";
                                         }
                                     }''')
     print value
     self.assertEqual(value, 'success')