HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulesydtest-0.22.0.0Haskell2010

Test.Syd.Modify

This module defines functions for declaring different test settings

  • 5 types
  • 26 values
  • Packagesydtest-0.22.0.0
  • Exports31
  • LanguageHaskell2010
  • LicenceLicenseRef-OtherLicense
  • SourceModify.hs

Declaring different test settings

6 declarations
datadata TestRunSettings
#
Instances4Eq, Show, Generic, Rep

Declaring parallelism

4 declarations
valueparallel :: TestDefM a b c -> TestDefM a b c
#

Declare that all tests below may be run in parallel. (This is the default.)

datadata Parallelism
#
Instances4Eq, Show, Generic, Rep

Declaring randomisation order

4 declarations
Instances4Eq, Show, Generic, Rep

Modifying timeouts

3 declarations

Modifying the number of retries

3 declarations

Declaring flakiness

7 declarations
valueflaky :: Word -> TestDefM a b c -> TestDefM a b c
#

Mark a test suite as "potentially flaky" with a given number of retries.

This will retry any test in the given test group up to the given number of tries, and pass a test if it passes once. The test output will show which tests were flaky.

WARNING: This is only a valid approach to dealing with test flakiness if it is true that tests never pass accidentally. In other words: tests using flaky must be guaranteed to fail every time if an error is introduced in the code, it should only be added to deal with accidental failures, never accidental passes.

valueflakyWith :: Word -> String -> TestDefM a b c -> TestDefM a b c
#

Like flaky, but also shows the given message to the user whenever the test is flaky.

You could use it like this:

Example1 expression
flakyWith 3 "Something sometimes goes wrong with the database, see issue 6346" ourTestSuite
valuenotFlaky :: TestDefM a b c -> TestDefM a b c
#

Mark a test suite as "must not be flaky".

This is useful to have a subgroup of a group marked as flaky that must not be flaky afteral.

valuepotentiallyFlaky :: TestDefM a b c -> TestDefM a b c
#

Mark a test suite as 'potentially flaky', such that it will not fail if it is flaky but passes at least once.

datadata FlakinessMode
#
Instances4Eq, Show, Generic, Rep

Declaring expectations

4 declarations
datadata ExpectationMode
#
Instances4Eq, Show, Generic, Rep