Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement --quickcheck-timeout for individual tests within a property #425

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

Bodigrim
Copy link
Collaborator

Presumably closes #359 and #424.

@phadej @brandonchinn178 could you please give it a try?

Bodigrim added 2 commits July 17, 2024 20:56
…ed for additional escape sequence"

This reverts commit b152a0b.

In fact, unless in Emacs, \r is not sufficient to clear the whole line.
@brandonchinn178
Copy link
Contributor

Looks great! Just ran it on a toy project

@@ -29,7 +29,7 @@ library
other-extensions: GeneralizedNewtypeDeriving, DeriveDataTypeable
build-depends: base >= 4.8 && < 5,
tagged < 0.9,
tasty >= 1.5 && < 1.6,
tasty >= 1.5.1 && < 1.6,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change does what I need, thanks!

... but

The tasty-1.5.1 on Hackage has base <0 revision made.

If I use both core and quickcheck from the repo, then cabal-install finds an install plan.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's expected, I'll release tasty-1.5.1.1 (or 1.5.2) soon.

@Bodigrim Bodigrim linked an issue Jul 19, 2024 that may be closed by this pull request
@Bodigrim Bodigrim merged commit b82e8c8 into master Jul 19, 2024
14 checks passed
@Bodigrim Bodigrim deleted the quickcheck-timeout branch July 19, 2024 23:04
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Feb 1, 2025
Version 0.11.1
--------------

* Add timeouts for individual tests within a property
  ([#425](UnkindPartition/tasty#425)).
* Define `showDefaultValue` for `QuickCheckTests`,
  `QuickCheckMaxSize` and `QuickCheckMaxRatio`
  ([#428](UnkindPartition/tasty#428)).
* Print the number of QuickCheck shrinks in the progress message
  ([#431](UnkindPartition/tasty#431)).
* Drop support for GHC 7.10.

Version 0.11
--------------

* Fix issues with QuickCheck progress reporting in the presence of `withMaxSuccess`
  ([#419](UnkindPartition/tasty#419)).
* Produce seeds that run a single failing tests instead of reproducing
  all the earlier successes ([#410](UnkindPartition/tasty#410)).

  Seeds are now pairs instead of single integers, e.g.
  `--quickcheck-replay="(SMGen 2909028190965759779 12330386376379709109,0)"`

  Single integer seeds are still accepted as input, but they do run through
  earlier successes.

  The `QuickCheckReplay` type used as a tasty option has three data constructors
  now. `QuickCheckReplayNone` is the default value and provides no seed.
  `QuickCheckReplayLegacy` takes an integer as before. The `QuickCheckReplay`
  data constructor takes the new seed form.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tasty-quickcheck: a way to print out seeds for successful tests Output quickcheck seed on timeout
4 participants