@@ -7,7 +7,8 @@ import scala.concurrent.Future
77import scala .concurrent .ExecutionContext
88import java .util .concurrent .atomic .AtomicReference
99
10- /** Trait that provides a `skip` method that can be used to skip a test, the test will pass.
10+ /**
11+ * Trait that provides a `skip` method that can be used to skip a test, the test will pass.
1112 * Used to assert that a test still compiles, and is intended to be re-enabled later,
1213 * but is temporarily prevented from running for a suitable reason.
1314 * At the end of a suite, print a summary of the number of skipped tests, and their names.
@@ -17,20 +18,26 @@ trait UTestIgnore(name: String) extends utest.TestSuite {
1718
1819 val skipList = AtomicReference (List .empty[String ])
1920
20- private final class SkipException (val name : String ) extends Exception with scala.util.control.NoStackTrace
21+ private final class SkipException (val name : String ) extends Exception
22+ with scala.util.control.NoStackTrace
2123
2224 def skip (op : => Any )(using path : utest.framework.TestPath ): Nothing = {
2325 throw new SkipException (name + " ." + path.value.mkString(" ." ))
2426 }
2527
2628 private def red (str : String ) = Console .RED + str + Console .RESET
2729
28- override def utestWrap (path : Seq [String ], runBody : => Future [Any ])(implicit ec : ExecutionContext ): Future [Any ] = {
29- super .utestWrap(path, runBody.recoverWith {
30- case e : SkipException =>
31- skipList.updateAndGet(e.name :: _)
32- Future .successful(())
33- })
30+ override def utestWrap (path : Seq [String ], runBody : => Future [Any ])(implicit
31+ ec : ExecutionContext
32+ ): Future [Any ] = {
33+ super .utestWrap(
34+ path,
35+ runBody.recoverWith {
36+ case e : SkipException =>
37+ skipList.updateAndGet(e.name :: _)
38+ Future .successful(())
39+ }
40+ )
3441 }
3542
3643 override def utestAfterAll (): Unit = {
@@ -46,7 +53,7 @@ trait UTestIgnore(name: String) extends utest.TestSuite {
4653}
4754
4855object MillPluginClasspathTest extends UtestIntegrationTestSuite
49- with UTestIgnore (" mill.integration.MillPluginClasspathTest" ) {
56+ with UTestIgnore (" mill.integration.MillPluginClasspathTest" ) {
5057
5158 val embeddedModules : Seq [(String , String )] = Seq (
5259 (" com.lihaoyi" , " mill-main-client" ),
0 commit comments