test.check

test.check is entangled with clojure.test

Details

  • Type: Defect Defect
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

test.check is tightly coupled to clojure.test; this means that it's difficult to use it with other test frameworks.

There is a dependency cycle between clojure.test.check and clojure.test.check.clojure-test.

quick-check uses clojure.test/report to print dots to the screen, meaning that quick-check necessarily depends on clojure.test

Activity

Hide
Philip Potter added a comment -

I wonder if the solution is to allow you to provide your own reporting functions to quick-check to report successes, failures, and trials? That way different frameworks can inject different behaviour as required.

Show
Philip Potter added a comment - I wonder if the solution is to allow you to provide your own reporting functions to quick-check to report successes, failures, and trials? That way different frameworks can inject different behaviour as required.
Hide
Gary Fredericks added a comment - - edited

This problem, according to anecdote, has the more severe effect of requiring a user of clojure.test.check.clojure-test to require clojure.test.check even if it's not otherwise being used (the defspec macro attempts to fix this but I believe that trick doesn't actually work, though the problem doesn't usually surface).

Show
Gary Fredericks added a comment - - edited This problem, according to anecdote, has the more severe effect of requiring a user of clojure.test.check.clojure-test to require clojure.test.check even if it's not otherwise being used (the defspec macro attempts to fix this but I believe that trick doesn't actually work, though the problem doesn't usually surface).
Hide
Gary Fredericks added a comment -

I was working on this a while ago but somehow got side-tracked.

I think my main idea was to add another option arg to quick-check which would be a reporting callback function. Then defspec would simply supply a function that does whatever it currently does, maybe integrating with clojure.test somehow.

Show
Gary Fredericks added a comment - I was working on this a while ago but somehow got side-tracked. I think my main idea was to add another option arg to quick-check which would be a reporting callback function. Then defspec would simply supply a function that does whatever it currently does, maybe integrating with clojure.test somehow.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: