Util.deleteFile(pigServer.getPigContext(), "simple_table");
Util.deleteFile(pigServer.getPigContext(), "simple_out");
Util.createInputFile(pigServer.getPigContext(), "simple_table", input);
Util.createLocalInputFile( "testScript.py", script);
ScriptEngine scriptEngine = ScriptEngine.getInstance("jython");
Map<String, List<PigStats>> statsMap = scriptEngine.run(pigServer.getPigContext(), "testScript.py");
assertEquals(1, statsMap.size());
Iterator<List<PigStats>> it = statsMap.values().iterator();
PigStats stats = it.next().get(0);
assertTrue(stats.isSuccessful());