File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
sonar-python-plugin/src/test/java/org/sonar/plugins/python Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 20
20
package org .sonar .plugins .python ;
21
21
22
22
import java .io .File ;
23
+ import java .io .IOException ;
24
+ import java .nio .file .Files ;
23
25
import java .util .Collections ;
24
26
import java .util .List ;
25
27
import org .junit .jupiter .api .BeforeEach ;
@@ -67,7 +69,7 @@ class IPynbSensorTest {
67
69
private static final String FILE_1 = "file1.ipynb" ;
68
70
private static final String NOTEBOOK_FILE = "notebook.ipynb" ;
69
71
70
- private final File baseDir = new File ("src/test/resources/org/sonar/plugins/python/ipynb" ).getAbsoluteFile ();
72
+ private final File baseDir = new File ("src/test/resources/org/sonar/plugins/python/ipynb/ " ).getAbsoluteFile ();
71
73
72
74
private SensorContextTester context ;
73
75
@@ -77,8 +79,10 @@ class IPynbSensorTest {
77
79
public LogTesterJUnit5 logTester = new LogTesterJUnit5 ().setLevel (Level .DEBUG );
78
80
79
81
@ BeforeEach
80
- void init () {
82
+ void init () throws IOException {
81
83
context = SensorContextTester .create (baseDir );
84
+ var workDir = Files .createTempDirectory ("workDir" );
85
+ context .fileSystem ().setWorkDir (workDir );
82
86
}
83
87
84
88
@ Test
You can’t perform that action at this time.
0 commit comments