mitch
10/12/2020, 11:52 PMJim
10/14/2020, 4:44 AMBlonde("foo", true, 23423, Paths.get("a/b/c"))
printing as Blonde(a=foo, b=true, c=23423, p=a\b\c)
but the tests expect Blonde(a=foo, b=true, c=23423, p=a/b/c)
- would I break something by changing the static string to use File.separator
so these tests work on windows as well? Or am I missing something here 🤔 I'm a little wary since I'm changing the clue code which seems related.
https://gist.github.com/jschneidereit/251bc1392639ff18741bcb2a844e9feaJim
10/14/2020, 5:45 AMshouldBeSymbolicLink should check if file is symbolic link
blows up in windows unless the test suite is running as admin. The easiest thing to do would be to just disable this test in windows. Possible solutions are to just disable this test in windows or check if the process is running as admin on windows using something like this: https://stackoverflow.com/a/10654463 (it works in the kotlin REPL but the SO comments make it sound like it's not a sure thing)christophsturm
10/14/2020, 2:27 PMval subject = Pantheon.NORSE
expectThat(subject)
.get(Pantheon::ruler) // reference to a property
.get { toString() } // return type of a method call
.isEqualTo("Odin")
jlw
10/15/2020, 1:21 PMhuehnerlady
10/15/2020, 2:21 PMhuehnerlady
10/16/2020, 8:44 AMRob Elliot
10/16/2020, 5:11 PMeventually
block.
VM options: -ea -Dkotlinx.coroutines.debug=on -Dkotlinx.coroutines.stacktrace.recovery=true
(belt, braces, stapled on to stomach).alexfacciorusso
10/18/2020, 1:57 PMwasyl
10/20/2020, 11:42 AMwasyl
10/20/2020, 3:52 PMchristophsturm
10/22/2020, 8:54 AMlistOf(
PythagTriple(3, 4, 5),
PythagTriple(6, 8, 10),
PythagTriple(8, 15, 17),
PythagTriple(7, 24, 25)
).map{ (a, b, c) -> test("test %a %b %c") { ...}
in a fun spec?huehnerlady
10/22/2020, 3:06 PMobject KotestConfig : AbstractProjectConfig() {
override val isolationMode = IsolationMode.InstancePerTest
override fun listeners() = listOf(SpringListener)
}
But when I set a break point in a test I can see that isolationMode is actually null. Also tried to use the deprecated function, same result.
I can also see that the mode is not working as I have one test bleeding into the other.
With the listeners it seems to work as the Spring tests are running without having the spring listener added
Any idea what I am doing wrong?wasyl
10/22/2020, 8:29 PMsystemProp.KOTEST_DEBUG=true
in gradle.properties
• tasks.withType(Test) { systemProperty("KOTEST_DEBUG", true) }
• exporting KOTEST_DEBUG env variable in console
• passing -DKOTEST_DEBUG=true in ./gradlew paramswhy
10/25/2020, 10:13 AMSourabh Rawat
10/25/2020, 2:40 PMJim
10/26/2020, 6:23 PMcontext
in other kotest spec styles. 🤔rpillay
10/27/2020, 6:16 AMkopper
10/28/2020, 2:11 AM-Dkotest.tags="UnitTest"
the report with test results includes test classes that were not tagged. They are listed at the end of report as single line per class, i.e. no specific tests are reported. I tagged test classes, so AFAIU the specs should not even be instantiated (and they aren't when I use tags in Maven). Is this UX bug?Sebastian Schuberth
10/28/2020, 9:25 AMSkipTestException
in kotest 4.3.0, but I cannot find it. Has it been removed from the code base?christophsturm
10/29/2020, 12:28 PMLuke
10/30/2020, 6:02 PMcollection shouldExist { … }
? I want to test that the collection does not contain an element matching the predicatesnowe
10/30/2020, 8:57 PM❯ ./gradlew build
> Configure project :
Kotlin Multiplatform Projects are an Alpha feature. See: <https://kotlinlang.org/docs/reference/evolution/components-stability.html>. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
> Task :kotest-assertions:kotest-assertions-shared:compileCommonMainKotlinMetadata FAILED
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/Retry.kt: (10, 8): Unresolved reference: kotlinx
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/Retry.kt: (83, 7): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public operator fun <T, R> DeepRecursiveFunction<TypeVariable(T), TypeVariable(R)>.invoke(value: TypeVariable(T)): TypeVariable(R) defined in kotlin
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/timing/Eventually.kt: (4, 8): Unresolved reference: kotlinx
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/timing/Eventually.kt: (51, 7): Unresolved reference: delay
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/timing/continually.kt: (4, 8): Unresolved reference: kotlinx
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/timing/continually.kt: (34, 7): Unresolved reference: delay
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/until/until.kt: (4, 8): Unresolved reference: kotlinx
e: /Users/tyler.thrailkill/dev/code/oss/kotest/kotest-assertions/kotest-assertions-shared/src/commonMain/kotlin/io/kotest/assertions/until/until.kt: (82, 7): Unresolved reference: delay
I don’t see any kotlinx dependency declared, so how is this building successfully with github actions?christophsturm
10/31/2020, 9:17 AMkopper
11/02/2020, 2:33 AMpeekandpoke
11/02/2020, 1:55 PMassertSoftly
with shouldNotBe
?
I just upgraded from the old kotlintest to kotest:4.3.1 and now some of my tests fail.
When I remove the surrounding assertSoftly
block then everythings is fine again. The assertions stay the same but do no longer fail!
It also seems to only happen when I use shouldNotBe
Any idea? Thanks!christophsturm
11/02/2020, 7:43 PMchristophsturm
11/02/2020, 11:50 PMpackage r2dbcfun
import io.kotest.core.spec.style.FunSpec
import java.io.StringReader
import kotlin.reflect.full.declaredMemberProperties
class Ko2Test : FunSpec({
listOf(1).forEach {
context("running") {
autoClose(StringReader("blah"))
context("ctx") {
data class K(val name: String)
K::class.declaredMemberProperties
}
}
}
})
peekandpoke
11/03/2020, 10:00 PMAhmed Mourad
11/04/2020, 8:39 AMException in thread "main" java.lang.ClassNotFoundException: io.kotest.engine.launcher.MainKt
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at com.intellij.rt.execution.CommandLineWrapper.loadMainClassWithCustomLoader(CommandLineWrapper.java:193)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:48)
I'm using a DescribeSpec
with no @RunWith
annotations:
class SomeTests : DescribeSpec({ ... })
This's what my build.gradle
looks like:
apply plugin: "com.android.library"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlin-kapt"
apply plugin: "de.mannodermaus.android-junit5"
...
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 17
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
...
}
testOptions {
unitTests.all {
useJUnitPlatform()
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
...
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test:core:1.3.0"
androidTestImplementation "androidx.test.ext:junit:1.1.2"
androidTestImplementation 'io.kotest:kotest-runner-junit5:4.3.1'
androidTestImplementation 'io.kotest:kotest-assertions-core:4.3.1'
androidTestImplementation 'io.kotest:kotest-property:4.3.1'
androidTestImplementation 'io.kotest:kotest-assertions-arrow:4.3.1'
}
and this's what my test configs look like:Ahmed Mourad
11/04/2020, 8:39 AMException in thread "main" java.lang.ClassNotFoundException: io.kotest.engine.launcher.MainKt
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
at com.intellij.rt.execution.CommandLineWrapper.loadMainClassWithCustomLoader(CommandLineWrapper.java:193)
at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:48)
I'm using a DescribeSpec
with no @RunWith
annotations:
class SomeTests : DescribeSpec({ ... })
This's what my build.gradle
looks like:
apply plugin: "com.android.library"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlin-kapt"
apply plugin: "de.mannodermaus.android-junit5"
...
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 17
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
...
}
testOptions {
unitTests.all {
useJUnitPlatform()
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
...
androidTestImplementation "androidx.test:runner:1.3.0"
androidTestImplementation "androidx.test:core:1.3.0"
androidTestImplementation "androidx.test.ext:junit:1.1.2"
androidTestImplementation 'io.kotest:kotest-runner-junit5:4.3.1'
androidTestImplementation 'io.kotest:kotest-assertions-core:4.3.1'
androidTestImplementation 'io.kotest:kotest-property:4.3.1'
androidTestImplementation 'io.kotest:kotest-assertions-arrow:4.3.1'
}
and this's what my test configs look like:alexfacciorusso
11/04/2020, 9:07 AM26
because of some dependencies in Kotest not compiling on earlier versions, but that example works for now