File tree Expand file tree Collapse file tree 2 files changed +20
-5
lines changed
core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/statistics
dataframe-jupyter/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter Expand file tree Collapse file tree 2 files changed +20
-5
lines changed Original file line number Diff line number Diff line change 1
1
package org.jetbrains.kotlinx.dataframe.statistics
2
2
3
3
import io.kotest.assertions.throwables.shouldThrow
4
- import io.kotest.matchers.booleans.shouldBeTrue
5
4
import io.kotest.matchers.doubles.shouldBeNaN
6
5
import io.kotest.matchers.floats.shouldBeNaN
7
6
import io.kotest.matchers.shouldBe
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ package org.jetbrains.kotlinx.dataframe.jupyter
3
3
import org.jetbrains.jupyter.parser.JupyterParser
4
4
import org.jetbrains.jupyter.parser.notebook.CodeCell
5
5
import org.jetbrains.jupyter.parser.notebook.Output
6
- import org.jetbrains.kotlinx.dataframe.BuildConfig
7
- import org.junit.Assume
8
- import org.junit.Before
6
+ import org.jetbrains.kotlinx.jupyter.exceptions.causesSequence
7
+ import org.jetbrains.kotlinx.jupyter.repl.result.EvalResultEx
8
+ import org.junit.AssumptionViolatedException
9
9
import org.junit.Test
10
10
import java.io.File
11
11
import java.util.Locale
@@ -120,9 +120,25 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
120
120
val codeToExecute = replacer.replace(code)
121
121
122
122
// println("Executing code:\n$codeToExecute")
123
- val cellResult = execRendered(codeToExecute)
123
+ val cellResult = execEx(codeToExecute)
124
+ if (cellResult is EvalResultEx .AbstractError ) {
125
+ throw cellResult.error
126
+ }
127
+ require(cellResult is EvalResultEx .Success )
128
+
124
129
// println(cellResult)
125
130
}
131
+ } catch (e: Exception ) {
132
+ if (e.causesSequence()
133
+ .filterIsInstance<IllegalStateException >()
134
+ .any { it.message?.contains(" null DefinitelyNotNullType for" ) == true }
135
+ ) {
136
+ // Issue #1116: https://github.com/Kotlin/dataframe/issues/1116
137
+ // Cannot finish test until this is solved, so treat this test as "ignored"
138
+ throw AssumptionViolatedException (" Test skipped due to issue #1116" )
139
+ } else {
140
+ throw e
141
+ }
126
142
} finally {
127
143
cleanup()
128
144
}
You can’t perform that action at this time.
0 commit comments