Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
regexp
Random tests missing.
Absolutely, using fullmatch instead of match makes it seem even better!
Just so you know, but re module also provides fullmatch, which automatically adds a start (^) and end ($) mark to your pattern.
No, really.
Passed all random tests, but didn't pass 13 and 14 ones.
What's in there?
It seems like i'm missing some kind of 'input checking'.
I think I did this? If you still see sample tests with code not compatible with Scala 3, then click the RESET button in the trainer to get the latest version (back up your solution first, because it wil also get reset).
If you think there's still some problem with tests, let me know.
Also, please ensure that
import org.scalatest.funsuite.AnyFunSuite
is added to quick tests. BecauseFunSpec
was moved fromorg.scalatest
toorg.scalatest.funsuite
with rename.Approved. Thanks!
Please see this kumite: https://www.codewars.com/kumite/624a23b422c35400570f83f3?sel=624a23b422c35400570f83f3 with fix for the issue, and migrating tests to Scala 3 (see https://github.com/codewars/runner/issues/89#issuecomment-939592547).
That bothered me too but an experience can be thought as valid when this experience can be repeated some numbers of times though I must agree that I don't have your wisdom.
This problem in ScalaTest is indeed very annoying, and not very widely known. It always annoys me that I need to remember about it when writing Scala tests, and I wonder if it could be avoided or made clearer. But what actually bothers me (a bit) is how quickly a valid issue got closed without fixing because "works for me". 605 other Scala users were just lucky.
The random tests generate test names (
it("<name>")
) dynamically. When there are multiple identical names, this is probably when this error appears.Well, I think you just resolved a valid issue without fixing.
Theres a special attention needed when writing tests for Scala, and the error is most probably caused by incorrect setup of tests.
I cannot check atm, but I will verify when I'm back home and submit a fix or reraise the issue if necessary.
I am getting the following exception in Scala runner:
These tests are provided by author, so I cannot do anything about it.
Loading more items...