Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Damian Reeves
    @DamianReeves
    Sorry... autocorrect
    Dirk T.
    @DirkToewe
    Hi everyone. Say, is it possible to run the same test for a Seq of elements, have the progress displayed in utest and on failure, the exact item/index reported for which the test failed?
    Matthew Pocock
    @drdozer
    does utest have a version that works in dotty?
    Matthew Pocock
    @drdozer
    :(
      java.lang.NoSuchMethodError: utest.Tests$.apply(Lscala/runtime/BoxedUnit;)Lutest/Tests;
        ExampleSpec$.<init>(Test1.scala:28)
        ExampleSpec$.<clinit>(Test1.scala:-1)
        jdk.internal.misc.Unsafe.ensureClassInitialized0(Unsafe.java:-2)
    Omer Zach
    @omerzach
    hey! i’m interested in getting utest to work like junit tests so i can use it easily with pants rather than SBT. happy to contribute back myself, but will need some pointers.
    Mikhail Filipchuk
    @LiuVII
    ^ +1 to questions from Omer Zach and Damian Reeves on junit integration
    Li Haoyi
    @lihaoyi
    @omerzach @LiuVII the docs for https://github.com/lihaoyi/utest#running-utest-standalone tell you how to run uTest programmatically, so you can just write your own thin wrapper to do that
    you can do that in any build tool, or without a build tool at all
    Eric K Richardson
    @ekrich
    Hi Guys, looks like you dropped support in the latest release for sjs0.6 for Scala 2.11. Wondering what was the reasoning or purpose behind this?
    Li Haoyi
    @lihaoyi
    it's old and I can't be bothered :P
    you can keep using the previous version if you're on 2.11
    nafg
    @nafg
    3 versions of scala is a lot to support at once :)
    Eric K Richardson
    @ekrich
    ok, I like either 3 or 2 versions but inclined to keep one old and one new if it is not any hassle. Certainly, 2.10 can create headaches.
    Marc Grue
    @marcgrue

    Asking on the scala-js channel also but this could maybe be related to utest, so I ask here too. Hope that's ok. Have upgraded the scalajs-cross-compile-example in this fork to Scala-js 0.6.28 and added Native and utests. Running main methods works fine on all platforms but when I run fooNative/test, the compilation can't find the Native classes even though I can see that they have been compiled in the target folder. Not sure if it's an issue with how I have set up build.sbt or utest. Any clues as to what I am missing?

    Steps to reproduce:

    git clone https://github.com/marcgrue/scalajs-cross-compile-example.git
    cd scalajs-cross-compile-example
    sbt
    fooNative/test
    Marc Grue
    @marcgrue
    Needed to move Native test suit into a package - they can't be on the root level!. Also a prerequisite for running Native tests is to have installed some libraries (brew install llvm bdw-gc re2 libuv). So, here you have a minimal Scala-js 0.6.28 crossProject running and utesting on all three platforms Scala JVM/JS/Native.
    @lihaoyi, maybe you want to write just two lines somewhere in your utest documentation about these prerequisites for running Native utests? That would be super helpful. Thanks a ton for all your fantastic libraries! :-)
    Rich
    @Rich2
    What 's the plan with Symbols? Should I replace all my utest Symbol literals with Symbol constructors, or are Symbols going to be replaced with Strings?
    nafg
    @nafg
    I think they already were. The whole syntax was changed
    Changed test syntax to test("foo"){...}, test{...}. Old syntax is now deprecated.
    Rich
    @Rich2
    Ah great, so that'll be in the 0.7.1 release? I'm using 0.6.9 but I notice GIthub labels 0.6.6 as the latest release.
    Nadav Samet
    @thesamet
    @lihaoyi Is there anyone working on dotty support? I am looking into helping with this and wanted to verify there are no duplicate efforts.
    Li Haoyi
    @lihaoyi
    i think one of the epfl folks might have looked into it, maybe ask on the dotty channel?
    Nadav Samet
    @thesamet
    @lihaoyi will do. ty!
    2efper
    @2efPer
    Does utest support scala2.13?
    Li Haoyi
    @lihaoyi
    yes
    2efper
    @2efPer
    Ok, Thanks.I found out I am using utest0.6.0 which does not exist in maven repo anymore.
    Jakob Odersky
    @jodersky

    Hi! I've been using utest for many projects and it's a really great library. Really like how to-the-point, no-nonsense it is. Thanks for making it happen!

    I'm working on a compiler project that has many "input to expected output" comparisons. We currently store the input and output in files in a resource directory, and use scalatest to create and run a test() for every file found in the directory. It is very often desirable to run only one of these tests when debugging, however it is quite complicated to do so with scalatest (the command line is super ugly). Since we are already using mill, I would like to also migrate our testing framework to utest, so that running a single test becomes trivial.

    There is unfortunately one problem currently preventing the migration:
    AFAIK, utest requires all tests to be statically defined. Is there a way around this limitation, so that we can automatically create a test for every file in a directory?
    Sequencer
    @sequencer
    Hi! I wonder if it is possible to generate a set of test with the map function or for block with compile time macro?
    Jakob Odersky
    @jodersky
    Ideally, I wouldn't require resource files to be present to compile. They might only be there during runtime.
    maybe I'm looking at this the wrong way. I could try creating a single test that iterates over all files available at test time. However I do lose utest's fine-grained error reporting that way
    Li Haoyi
    @lihaoyi
    @jodersky you can generate tests programmatically by overriding def tests with your own Seq of tests
    I think @olafurpg was doing that in one of his projects
    Jakob Odersky
    @jodersky
    great, thanks! I'll look into that
    Li Haoyi
    @lihaoyi
    @jodersky @sequencer I think this is what you want https://github.com/lihaoyi/utest/issues/127#issuecomment-338424350
    Jakob Odersky
    @jodersky
    :+1:
    Sequencer
    @sequencer
    @lihaoyi Got it! Thank you for your help!
    Ólafur Páll Geirsson
    @olafurpg
    Is there a way to get the summary of all failing tests like it older utest version? I tried overriding def showSummaryThreshold = 30 from the README but the method no longer exists.
    Li Haoyi
    @lihaoyi
    haha i’ve been wondering that too
    Ólafur Páll Geirsson
    @olafurpg

    I got it working by overriding formatSummary https://gist.github.com/olafurpg/3085a4b9e9635db22bbc10b01252deeb

    I println the summary since the returned value seems to be ignored.

    The failure summary is really handy when digging through CI logs
    Li Haoyi
    @lihaoyi
    i remember it used to print the summaries, but at some point it stopped and i havent bothered investigating yet
    Ólafur Páll Geirsson
    @olafurpg
    even simpler workaround
        override def formatSummary(
            topLevelName: String,
            results: HTree[String, Result]
        ): Option[ufansi.Str] = {
          val result = super.formatSummary(topLevelName, results)
          result.foreach(println)
          result
        }
    the summary is getting rendered but not printed
    Li Haoyi
    @lihaoyi
    :+1:
    hmf
    @hmf
    What is the best way to replicate JUnit's org.junit.Assert.fail? uTest seems to "only" have the assert. TIA
    Sequencer
    @sequencer
    Hello, @lihaoyi. I'm working on the problem related to #211, that I need support both 2.12 and 2.11 with utest, I found that "some test here" -{testFn} has been deprecated, and I afraid 0.6.8 and 0.7.1 will break API compatibility since this issue, will there be any solution to this?
    James Collier
    @Slakah
    Hi folks, I raised the PR lihaoyi/utest#206 quite a while ago, to fix a deprecation warning I see when building my projects using 2.13. Would greatly appreciate some feedback!