basilisp icon indicating copy to clipboard operation
basilisp copied to clipboard

`basilisp.test/are` suppresses line numbers on test failures

Open chrisrink10 opened this issue 4 years ago • 1 comments

basilisp.test/is fetches line numbers from the (is ...) form during macroexpansion to report line numbers of failing tests. It seems that are-based tests lose reader position when they're first read and therefore we end up getting line number outputs like this:

FAIL in (hierarchy-test) (test_core_fns.lpy:None)
     derived with keywords :: underive :: ancestors :: Test failure: (= nil (ancestors h :tests.basilisp.test-core-fns/isosceles))

    expected: nil
      actual: #{:tests.basilisp.test-core-fns/polygon}

chrisrink10 avatar May 22 '21 17:05 chrisrink10

In working on #643 I investigated a few different options for trying to thread the line number corresponding to the (are ...) form into the generated (is ...) assertions, but none of them seemed to be working. I still believe there's a solution here, but I think I'll need to spend a bit more time digging.

chrisrink10 avatar Jun 24 '21 12:06 chrisrink10