Alex, 
     When I attempt to specify :num-tests, ie: 

(stest/check `do-something {:clojure.spec.test.check/opts {:num-tests 10}})

It usually seems to work, but sometimes I can see code executing far more 
than the number of tests I've specified.  This appears to be correlated to 
when it finds an error - but I usually don't know that until after the test 
run has completed.  Is this a case of spec attempting to 'shrink' the input 
to arrive at the cause of the problem?

I am running the command from the repl and so maybe that impacts it?  
However, even with summarize-results it feels like the effect would be the 
same.  Is there a different way that I'm supposed to consume this lazy 
sequence generated by stest/check?

Thanks!
Chris

On Wednesday, August 3, 2016 at 1:46:32 PM UTC-5, Alex Miller wrote:
>
> As the docstring for check notes:
>
> "The opts map includes the following optional keys, where stc
> aliases clojure.spec.test.check:
>
> ::stc/opts  opts to flow through test.check/quick-check
> :gen        map from spec names to generator overrides"
>
> So the opts map would be like:
>
> (stest/check `myfunc {:clojure.spec.test.check/opts {:num-tests 2}})
>
>
> On Wednesday, August 3, 2016 at 9:34:11 AM UTC-5, Burt wrote:
>>
>> Hi,
>>
>> (stest/check `myfunc) runs very, very long
>>
>> so i tried
>>
>> (stest/check `myfunc {:num-tests 2})
>>
>> but unfortunately that does not restrict the number of test.
>>
>> Can anybody help?
>>
>> Kind regards, Burt
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to