haskell-hedgehog icon indicating copy to clipboard operation
haskell-hedgehog copied to clipboard

Open a file in a Property

Open andrewthad opened this issue 7 years ago • 1 comments
trafficstars

Is there a way to open a file as a part of a property check? I'm write a parser library, and one behavior I need to test is the a source string is parsed the same regardless of how it is chunked. I would like to load the file into memory once and then rechunk it on each run of the test. I cannot see how to do this. If I do IO in Property, I think the IO will be repeated every time.

andrewthad avatar Mar 19 '18 20:03 andrewthad

Perhaps, this is related: https://github.com/hedgehogqa/haskell-hedgehog/issues/122 If so, you should be able to load it once.

moodmosaic avatar Mar 20 '18 08:03 moodmosaic