Skip to content

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ileasile committed Jun 20, 2022
1 parent be5de2b commit 1a43667
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/test/kotlin/org/jetbrains/kotlinx/jupyter/test/TestUtilTest.kt
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
package org.jetbrains.kotlinx.jupyter.test

import jupyter.kotlin.DependsOn
import io.kotest.matchers.shouldBe
import org.junit.jupiter.api.Test
import kotlin.script.experimental.jvm.util.classpathFromClassloader
import kotlin.script.experimental.jvm.util.scriptCompilationClasspathFromContext

class TestUtilTest {
@Test
fun classpath() {
val classLoader = TestUtilTest::class.java.classLoader

val cp0 = classpathFromClassloader(classLoader)
println(cp0)

val cp1 = scriptCompilationClasspathFromContext(
"lib",
"api",
Expand All @@ -17,11 +23,13 @@ class TestUtilTest {
"kotlinx-serialization-json",
"kotlinx-serialization-json-jvm",
"kotlinx-serialization-core-jvm",
classLoader = DependsOn::class.java.classLoader
classLoader = classLoader
)
println(cp1)

val cp2 = classpath
println(cp2)

cp1 shouldBe cp2
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jetbrains.kotlinx.jupyter.test

import io.kotest.assertions.fail
import jupyter.kotlin.DependsOn
import jupyter.kotlin.JavaRuntime
import org.jetbrains.kotlinx.jupyter.MutableCodeCell
import org.jetbrains.kotlinx.jupyter.ReplRuntimeProperties
Expand Down Expand Up @@ -60,7 +59,7 @@ val classpath = scriptCompilationClasspathFromContext(
"kotlinx-serialization-json",
"kotlinx-serialization-json-jvm",
"kotlinx-serialization-core-jvm",
classLoader = DependsOn::class.java.classLoader
classLoader = TestDisplayHandler::class.java.classLoader
)

val testLibraryResolver: LibraryResolver
Expand Down

0 comments on commit 1a43667

Please sign in to comment.