@@ -113,7 +113,7 @@ public void evalFailsOnError() {
113
113
114
114
@ Test
115
115
public void evalNonInteractiveThrowsSyntaxError () throws IOException {
116
- try (Context c = Context .newBuilder ().option ("python.TerminalIsInteractive" , "false" ).build ()) {
116
+ try (Context c = Context .newBuilder ().allowAllAccess ( true ). option ("python.TerminalIsInteractive" , "false" ).build ()) {
117
117
c .eval (Source .newBuilder ("python" , INCOMPLETE_SOURCE , "eval" ).interactive (false ).build ());
118
118
} catch (PolyglotException t ) {
119
119
assertTrue (t .isSyntaxError ());
@@ -125,7 +125,7 @@ public void evalNonInteractiveThrowsSyntaxError() throws IOException {
125
125
126
126
@ Test
127
127
public void evalNonInteractiveInInteractiveTerminalThrowsSyntaxError () throws IOException {
128
- try (Context c = Context .newBuilder ().option ("python.TerminalIsInteractive" , "true" ).build ()) {
128
+ try (Context c = Context .newBuilder ().allowAllAccess ( true ). option ("python.TerminalIsInteractive" , "true" ).build ()) {
129
129
c .eval (Source .newBuilder ("python" , INCOMPLETE_SOURCE , "eval" ).interactive (false ).build ());
130
130
} catch (PolyglotException t ) {
131
131
assertTrue (t .isSyntaxError ());
@@ -137,7 +137,7 @@ public void evalNonInteractiveInInteractiveTerminalThrowsSyntaxError() throws IO
137
137
138
138
@ Test
139
139
public void evalInteractiveInNonInteractiveTerminalThrowsSyntaxError () throws IOException {
140
- try (Context c = Context .newBuilder ().option ("python.TerminalIsInteractive" , "false" ).build ()) {
140
+ try (Context c = Context .newBuilder ().allowAllAccess ( true ). option ("python.TerminalIsInteractive" , "false" ).build ()) {
141
141
c .eval (Source .newBuilder ("python" , INCOMPLETE_SOURCE , "eval" ).interactive (true ).build ());
142
142
} catch (PolyglotException t ) {
143
143
assertTrue (t .isSyntaxError ());
@@ -149,7 +149,7 @@ public void evalInteractiveInNonInteractiveTerminalThrowsSyntaxError() throws IO
149
149
150
150
@ Test
151
151
public void evalInteractiveInInteractiveTerminalThrowsSyntaxError () throws IOException {
152
- try (Context c = Context .newBuilder ().option ("python.TerminalIsInteractive" , "true" ).build ()) {
152
+ try (Context c = Context .newBuilder ().allowAllAccess ( true ). option ("python.TerminalIsInteractive" , "true" ).build ()) {
153
153
c .eval (Source .newBuilder ("python" , INCOMPLETE_SOURCE , "eval" ).interactive (true ).build ());
154
154
} catch (PolyglotException t ) {
155
155
assertTrue (t .isSyntaxError ());
0 commit comments