JuliaPhysics / Measurements.jl

Error propagation calculator and library for physical measurements. It supports real and complex numbers with uncertainty, arbitrary precision calculations, operations with arrays, and numerical integration.

Home Page:https://juliaphysics.github.io/Measurements.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests fail on 1.4 due to changes in how things are printed

KristofferC opened this issue · comments

Type representation: Test Failed at /home/pkgeval/.julia/packages/Measurements/I2ugE/test/runtests.jl:570
  Expression: repr("text/plain", [w 10x; 100y 1000w]) == "2×2 Array{Measurement{Float64},2}:\n  -0.5±0.03    30.0±1.0 \n 400.0±20.0  -500.0±30.0"
   Evaluated: 
"2×2 Array{Measurement{Float64},2}:\n  -0.5±0.03    30.0±1.0\n 400.0±20.0  -500.0±30.0" == 
"2×2 Array{Measurement{Float64},2}:\n  -0.5±0.03    30.0±1.0 \n 400.0±20.0  -500.0±30.0"
Stacktrace:
 [1] macro expansion at /home/pkgeval/.julia/packages/Measurements/I2ugE/test/runtests.jl:570 [inlined]
 [2] macro expansion at /workspace/srcdir/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1116 [inlined]
 [3] top-level scope at /home/pkgeval/.julia/packages/Measurements/I2ugE/test/runtests.jl:549

It's usually not a great idea to test exactly how Base prints things.

Thanks for pointing this out!

It's usually not a great idea to test exactly how Base prints things.

Well, this package defines some Base.show methods, this is what is being tested. The problem is that part of the printing is delegated to Base -- of course I'm not going to redefine everything.

Yeah, I meant, maybe it is ok to just test the output for the numbers themselves and rely on that Base prints arrays of numbers reasonably. Anyway, not a big deal.