Skip to content

Commit 44bc98c

Browse files
committed
Delete malformed environment dirs before testing
1 parent 2c8bfe2 commit 44bc98c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/test/java/org/apposed/appose/BuilderTest.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import org.apposed.appose.builder.MambaBuilder;
3434
import org.apposed.appose.builder.PixiBuilder;
3535
import org.apposed.appose.builder.UvBuilder;
36+
import org.apposed.appose.util.FilePaths;
3637
import org.junit.jupiter.api.Test;
3738

3839
import java.io.File;
@@ -87,24 +88,28 @@ public void testPixiBuilderAPI() throws IOException, InterruptedException {
8788
}
8889

8990
@Test
90-
public void testPixiVacuous() {
91+
public void testPixiVacuous() throws IOException {
92+
String base = "target/envs/pixi-vacuous";
93+
FilePaths.deleteRecursively(new File(base));
9194
assertThrows(IllegalStateException.class, () -> {
9295
Appose
9396
.pixi()
94-
.base("target/envs/pixi-vacuous")
97+
.base(base)
9598
.logDebug()
9699
.build();
97100
});
98101
}
99102

100103
@Test
101-
public void testPixiApposeRequirement() {
104+
public void testPixiApposeRequirement() throws IOException {
105+
String base = "target/envs/pixi-appose-requirement";
106+
FilePaths.deleteRecursively(new File(base));
102107
assertThrows(IllegalStateException.class, () -> {
103108
Appose
104109
.pixi()
105110
.conda("python")
106111
.pypi("cowsay==6.1")
107-
.base("target/envs/pixi-appose-requirement")
112+
.base(base)
108113
.logDebug()
109114
.build();
110115
});

0 commit comments

Comments
 (0)