COBREXA / AbstractFBCModels.jl

General interface for flux-based constrained metabolic models
Apache License 2.0
0 stars 0 forks source link

Make test failures more descriptive #9

Closed stelmo closed 11 months ago

stelmo commented 11 months ago

Currently when an accessor implementation tests fails (through run_fbcmodel_type_tests) the output is very uninformative, as shown below:

julia>         A.run_fbcmodel_type_tests(J.JSONFBCModel)
reactions should return Vector{String}: Test Failed at C:\Users\stelmo\.julia\packages\AbstractFBCModels\YSueK\src\utils.jl:142
  Expression: all((t->begin
            t <: ret
        end), unique(Base.return_types(f, args)))

Stacktrace:
 [1] macro expansion
   @ C:\Users\stelmo\.julia\juliaup\julia-1.9.3+0.x64.w64.mingw32\share\julia\stdlib\v1.9\Test\src\Test.jl:478 [inlined]
 [2] macro expansion
   @ C:\Users\stelmo\.julia\packages\AbstractFBCModels\YSueK\src\utils.jl:142 [inlined]
 [3] macro expansion
   @ C:\Users\stelmo\.julia\juliaup\julia-1.9.3+0.x64.w64.mingw32\share\julia\stdlib\v1.9\Test\src\Test.jl:1498 [inlined]
 [4] (::AbstractFBCModels.var"#rt#9")(f::Function, ret::Type, args::Type)
   @ AbstractFBCModels C:\Users\stelmo\.julia\packages\AbstractFBCModels\YSueK\src\utils.jl:142
metabolites should return Vector{String}: Test Failed at C:\Users\stelmo\.julia\packages\AbstractFBCModels\YSueK\src\utils.jl:142

The atest from FBCModelTests would be nice to have here...

exaexa commented 11 months ago

done in #14