mitch
10/18/2022, 11:08 AM./gradlew :module:test --tests "A*"
. While this used to work fine in kotest 5.4.2, with 5.5.1 our CI seems to mark all tests as skipped now.
AWSRegionTest > json serialization/deserialization should round trip SKIPPED
AWSRegionTest STANDARD_OUT
~~~ AWSRegionTest ~~~
+ json serialization/deserialization should round trip: TestResult=Ignored(reason=json serialization/deserialization should round trip is excluded by test filter(s))
I’m pretty sure that comes from TestFilterEnabledExtension
I wonder if there’s something that I may have missed or if this is a known regression?
that TestFilterResult.Exclude.reason
value must have been null, which can only be the case if GradleClassMethodRegexTestFilter.filter
method went to the else branchabendt
10/18/2022, 11:10 AMpakoito
10/19/2022, 11:31 AMArb
override fun sample(rs: RandomSource): Sample<Value> {
val value = makeValue(rs.random.nextInt())
Sample(value, RTree({ value }))
}
pakoito
10/19/2022, 11:31 AMpakoito
10/19/2022, 11:32 AMpakoito
10/19/2022, 11:33 AMval subsequentValues = Generators.someValue.flatMap { w1 ->
Generators.window.filter { w1 < it }.map { w1 to it }
}
"should fail on empty map" {
checkAll(subsequentValues) { (v1, v2) ->
someFun(emptyMap(), v1, v2) shouldBeInvalid "A".nel()
}
}
pakoito
10/19/2022, 11:45 AMfilter { w1 < it }
, if I use a simpler check it finishes in a few hundred MSpakoito
10/19/2022, 11:58 AMpakoito
10/19/2022, 12:03 PMtoArb
also doesn't inform the test of the maximum number of values avaulablepakoito
10/19/2022, 12:09 PMpakoito
10/19/2022, 12:09 PMrobstoll
10/20/2022, 8:30 PMsam
10/20/2022, 9:01 PMDavio
10/21/2022, 6:44 AMParameterizedTest
with a CSVSource
? I have two rows each with 3 values, but with the parameterized test, I have type safety by way of the method signature, which is myTest(Int, Int, String), my workaround for this is currently:
checkAll(Exhaustive.of(Triple(1, 1, "A"), Triple(2, 3, "B")) { }
But this does not seem very elegant as I still have to bind the triple values to the named variables I wantDavio
10/24/2022, 10:05 AM@DirtiesContext
but to no avail. Any thoughts?abendt
10/26/2022, 12:50 PMclass DataDrivenExampleSpec : StringSpec({
extension(MyListener())
withData(listOf(1, 2)) {
println("Test $it")
}
"single 1" {
println("single 1")
}
"single 2" {
println("single 2")
}
})
class MyListener : BeforeTestListener, AfterEachListener, AfterTestListener {
override suspend fun beforeTest(testCase: TestCase) {
println("beforeTest")
}
override suspend fun afterEach(testCase: TestCase, result: TestResult) {
println("afterEach")
}
override suspend fun afterTest(testCase: TestCase, result: TestResult) {
println("afterTest")
}
}
i would expect that the two after* callbacks to behave similiar regardless if the test is a data driven one or not.
However i am seeing that afterEach is not invoked for the data driven tests. Is this intended?
beforeTest
Test 1
afterTest
beforeTest
Test 2
afterTest
beforeTest
single 1
afterTest
afterEach
beforeTest
single 2
afterTest
afterEach
abendt
10/28/2022, 10:34 AMBen Woodworth
10/29/2022, 5:04 AM0f shouldBe -0f
failing like I expect, but NaN shouldBe NaN
failing when I'd want it to pass. (also worth noting, 0f shouldBeExactly -0f
does fail, and so does 0f shouldBeEqualComparingTo -0f
)
I saw several discussions in the issue tracker which conclude that "IEEE says they're equal". Which I do understand, but I would've expected shouldBeExactly
to work like I expect here
(failing for ±0
and passing for NaN
), and maybe a similar shouldEqual
that's the opposite for these cases
(passing for ±0
and failing for NaN
) going off ==
behind the scenes, in turn following the IEEE spec.
I couldn't find one, but is there a function out there to accomplish this? Something that confirms values are "the same", e.g. for an identity function that should work for any/all values thrown at it. I'll probably write my own Float/Double shouldBinaryEqual
functions but I would be curious what others thinkAnouar di Kali
10/30/2022, 4:03 PM@RequiresTag("Windows")
class Command : FunSpec({
test("shutdown /r") {
println("Restarting Computer...")
}
test("shutdown"){
println("Shutting Down....")
}
})
simon.vergauwen
11/02/2022, 1:57 PMInvalid device: Apple Watch Series 5 - 44mm
Stefan Lobbenmeier
11/16/2022, 5:09 PMimport assertk.all
import assertk.assertions.isEqualTo
import assertk.assertions.prop
import org.junit.jupiter.api.Test
class Test {
data class Data(val id: Int)
@Test
internal fun test() {
// AssertJ
org.assertj.core.api.Assertions.assertThat(Data(1)).returns(1, Data::id)
// AssertK
assertk.assertThat(Data(1)).all {
prop(Data::id).isEqualTo(1)
}
// kotest-assertions?
}
}
ayodele
11/17/2022, 10:36 AMframework-engine
to commonMain
makes it unable to create Kotlin classesJavier
11/17/2022, 11:30 AMBehaviorSpec
? For example, Paparazzi for snapshot tests uses a rule.LeoColman
11/17/2022, 3:13 PMLeoColman
11/17/2022, 3:14 PMJames Eschner
11/18/2022, 4:36 PMWARNING: Illegal reflective access by io.kotest.extensions.system.SystemEnvironmentExtensionsKt (file:/Users/jameseschner/.gradle/caches/modules-2/files-2.1/io.kotest/kotest-extensions-jvm/5.4.2/6766e9c72f80428a6c301d7b3a10e7bc940a96ab/kotest-extensions-jvm-5.4.2.jar) to field java.util.Collections$UnmodifiableMap.m
WARNING: Please consider reporting this to the maintainers of io.kotest.extensions.system.SystemEnvironmentExtensionsKt
** not a contributionabendt
11/21/2022, 2:25 PMRohde Fischer
11/22/2022, 6:30 AMrocketraman
11/22/2022, 1:55 PMRoach
11/24/2022, 5:16 AM