Skip to content

Commit 02fcfdd

Browse files
committed
try alternative path computation
1 parent 4b12a62 commit 02fcfdd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

commons/util/src/test/java/net/automatalib/common/util/process/ProcessUtilTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717

1818
import java.io.IOException;
1919
import java.io.StringReader;
20+
import java.net.URISyntaxException;
21+
import java.net.URL;
22+
import java.nio.file.Paths;
2023
import java.util.Objects;
2124
import java.util.StringJoiner;
2225

@@ -31,9 +34,10 @@ public class ProcessUtilTest {
3134
private final String program;
3235
private final String path;
3336

34-
public ProcessUtilTest() {
37+
public ProcessUtilTest() throws URISyntaxException {
3538
this.program = "python";
36-
this.path = Objects.requireNonNull(ProcessUtilTest.class.getResource("/process.py")).getPath();
39+
URL resource = Objects.requireNonNull(ProcessUtilTest.class.getResource("/process.py"));
40+
this.path = Paths.get(resource.toURI()).toFile().getAbsolutePath();
3741
}
3842

3943
@BeforeTest

0 commit comments

Comments
 (0)