'Clojure: unit-tests defined with with-test are not actually run
Example adapted from the standard documentation for with-test:
(ns my-test
(:require [clojure.test :refer :all]))
(with-test
(defn my-function [x y]
;; (assert false)
(+ x y))
(is (= 4 (my-function 2 2)))
(is (= 7 (my-function 3 4))))
(test #'my-function)
The 'with-test' block and the 'test' blocks are evaluated correctly (using C-x C-e in emacs/cider).
But then if I uncomment the 'assert' line they still are!
Directly evaluating (my-function 2 2) fails.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
