Skip to content

(basilisp.test/is (= act expr) evaluates its arguments twice on failure #712

@ikappaki

Description

@ikappaki

Hi,

(is (= act expr) evaluates its act and exprtwice when the expression is not equal, that might cause additional side effects on tests.

To reproduce,

  1. Open up a REPL
  2. Create a test with a (println :5) argument to = that fails the equation, it prints :5 out twice, while it should only pint it out only once
(deftest issue
                    (is (= 8 (println :5))))
#'basilisp.user/issue

basilisp.user=> (issue)
:5
:5
{:failures [{:message "Test failure: (= 8 (println :5))" :test-name "issue" :line 2 :expected 8 :type :failure :expr (= 8 (println :5)) :actual nil :test-section nil}]}

PR to follow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions