Skip to content

Commit 3b92e43

Browse files
committed
the context needs all access to get to the pythonhome during junit
1 parent 46aae61 commit 3b92e43

File tree

1 file changed

+4
-4
lines changed
  • graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/interop

1 file changed

+4
-4
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/interop/JavaInteropTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public void evalFailsOnError() {
113113

114114
@Test
115115
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()) {
117117
c.eval(Source.newBuilder("python", INCOMPLETE_SOURCE, "eval").interactive(false).build());
118118
} catch (PolyglotException t) {
119119
assertTrue(t.isSyntaxError());
@@ -125,7 +125,7 @@ public void evalNonInteractiveThrowsSyntaxError() throws IOException {
125125

126126
@Test
127127
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()) {
129129
c.eval(Source.newBuilder("python", INCOMPLETE_SOURCE, "eval").interactive(false).build());
130130
} catch (PolyglotException t) {
131131
assertTrue(t.isSyntaxError());
@@ -137,7 +137,7 @@ public void evalNonInteractiveInInteractiveTerminalThrowsSyntaxError() throws IO
137137

138138
@Test
139139
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()) {
141141
c.eval(Source.newBuilder("python", INCOMPLETE_SOURCE, "eval").interactive(true).build());
142142
} catch (PolyglotException t) {
143143
assertTrue(t.isSyntaxError());
@@ -149,7 +149,7 @@ public void evalInteractiveInNonInteractiveTerminalThrowsSyntaxError() throws IO
149149

150150
@Test
151151
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()) {
153153
c.eval(Source.newBuilder("python", INCOMPLETE_SOURCE, "eval").interactive(true).build());
154154
} catch (PolyglotException t) {
155155
assertTrue(t.isSyntaxError());

0 commit comments

Comments
 (0)