Skip to content

Add --tree-display flag to orgnanize tests hierarchically

decentral1se requested to merge mkscrg:module-tree into master

Created by: mkscrg

A batteries-included feature request 😄

This adds a --tree-display flag to display tests according to the module structure. Hierarchical display is helpful when working with larger test suites.

E.g. when used on this repo, test output looks like

test/Tasty.hs
  ConfigTest
    noModuleSuffixEmptyList:                 OK
    differentGeneratedModule:                OK
    ignoreAModule:                           OK
    noModuleSuffix:                          OK
    noTreeDisplayDefault:                    OK
    treeDisplay:                             OK
    mkModuleTree:                            OK (0.16s)
      +++ OK, passed 100 tests.
  DiscoverTest
    listCompare:                             OK
    additionCommutative:                     OK
      +++ OK, passed 100 tests.
    prelude
      Prelude.head
        returns the first element of a list: OK
    Addition commutes:                       OK
      +++ OK, passed 100 tests.
    multiplication
      Multiplication commutes:               OK
        +++ OK, passed 100 tests.
      One is identity:                       OK
        +++ OK, passed 100 tests.
    Some input:                              OK
    generateTrees
      First input:                           OK
      Second input:                          OK
  SubMod.PropTest
    additionAssociative:                     OK
      +++ OK, passed 100 tests.

All 17 tests passed (0.17s)

Merge request reports