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

Test failing on coverage does not print exact location #310

Open
owickstrom opened this issue Jul 10, 2019 · 0 comments
Open

Test failing on coverage does not print exact location #310

owickstrom opened this issue Jul 10, 2019 · 0 comments

Comments

@owickstrom
Copy link
Contributor

In #308 we added the location information of failed assertions. Conversely, it would be great if failed coverage checks also print location information. But it turns out they do not:

  ✗ prop_example failed 
    after 100 tests.
  ⚠ large 0% ···················· ✗ 1%
  
        ┏━━ Example.hs ━━━
    144 ┃ prop_example = property $ do
    145 ┃   n <- forAll (Gen.int32 (Range.linear 0 10))
    146 ┃   cover 1 "large" (n > 10)
        ┃   ^^^^^^^^^^^^^^^^^^^^^^^^
        ┃   │ Failed (0% coverage)
  
    Insufficient coverage.
  
  ✗ 1 failed, 1 succeeded.

I'd like for it to have location information, and thus print:

  ✗ prop_example failed at Example.hs:146:3
    after 100 tests.

I haven't yet dug into why this might be. Might try to get a PR up within the coming days.

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

No branches or pull requests

1 participant