tasty-expected-failure: Mark tasty tests as failure expected

[ library, mit, testing ] [ Propose Tags ]

With the function Test.Tasty.ExpectedFailure.expectFail in the provided module Test.Tasty.ExpectedFailure, you can mark that you expect test cases to fail, and not to pass.

This can for example be used for test-driven development: Create the tests, mark them with Test.Tasty.ExpectedFailure.expectFail, and you can still push to the main branch, without your continuous integration branch failing.

Once someone implements the feature or fixes the bug (maybe unknowingly), the test suite will tell him so, due to the now unexpectedly passing test, and he can remove the Test.Tasty.ExpectedFailure.expectFail marker.

The module also provides Test.Tasty.ExpectedFailure.ignoreTest to avoid running a test. Both funtions are implemented via the more general Test.Tasty.ExpectedFailure.wrapTest, which is also provided.


[Skip to Readme]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.11, 0.11.0.1, 0.11.0.2, 0.11.0.3, 0.11.0.4, 0.11.1, 0.11.1.1, 0.11.1.2, 0.12, 0.12.1, 0.12.2, 0.12.3
Dependencies base (>=4.5 && <4.13), tagged (>=0.7 && <0.9), tasty (>=0.11) [details]
License MIT
Copyright 2015 Joachim Breitner
Author Joachim Breitner
Maintainer mail@joachim-breitner.de
Revised Revision 1 made by JoachimBreitner at 2018-09-25T02:43:13Z
Category Testing
Home page http://github.com/nomeata/tasty-expected-failure
Source repo head: git clone git://github.com/nomeata/tasty-expected-failure
Uploaded by JoachimBreitner at 2018-03-12T12:55:59Z
Distributions Arch:0.12.3, Debian:0.11.1.2, LTSHaskell:0.12.3, NixOS:0.12.3, Stackage:0.12.3
Reverse Dependencies 7 direct, 71 indirect [details]
Downloads 16795 total (154 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-12 [all 1 reports]

Readme for tasty-expected-failure-0.11.1.1

[back to package description]

tasty-expected-failure

What is this?

With the function expectFail in the provided module ExpectedFailure, you can mark that you expect test cases to fail, and not to pass.

This can for example be used for test-driven development: Create the tests, mark them with expectFail, and you can still push to the main branch, without your continuous integration branch failing.

Once someone implements the feature or fixes the bug (maybe unknowingly), the test suite will tell him so, due to the now unexpectedly passing test, and he can remove the expectFail marker.

The module also provides ignoreTest to avoid running a test. Both funtions are implemented via the more general wrapTest, which is also provided.

Why is this not provided by tasty?

<rant>

The author of the tasty library prefers to provide a minimal experience in the tasty library, instead of a batteries-included approach, and chose not to include these 39 lines of code in tasty. See the issue for the discussion.

Instead I wrote 37 lines of cabal file, a similar number of lines of README, created a git repository, created a travis file, run travis to figure out on what versions it builds (something that would have happened automatically with a pull request for tasty), upload to hackage, add to stackage.

Furthermore, there is little discoverability: If it were part of the tasty API, users would stumble over it. Now they likely won’t. And if they do, they have to worry about whether it is still in sync with tasty, they have to add it to their build-depends, they have to import yet another module. Distribution packagers will have yet another package where they have to create the packaging, check the copyright, and run autobuilders for.

Sigh.

</rant>