JuliaSymbolics / SymbolicUtils.jl

Symbolic expressions, rewriting and simplification
https://docs.sciml.ai/SymbolicUtils/stable/
Other
524 stars 99 forks source link

Intriguing test failure in PkgEval #484

Open PallHaraldsson opened 1 year ago

PallHaraldsson commented 1 year ago

I noticed with new not yet merged PR at JuliaLang with PkgEval:

[I'm unclear on why 5y and 5x get reversed (and not without the new PR), it could be a bug in the PR (or this package?), but also since this is mathematically the same does it matter and should the test be relaxed to allow it?]

as_polynomial: Test Failed at /home/pkgeval/.julia/packages/SymbolicUtils/qulQp/test/polyform.jl:86
  Expression: repr(as_polynomial(((f, x, y)->begin
                    f(gcd(x, y))
                end), 10x + 10y, 5 * (x ^ 2 - y ^ 2), polyform = true)) == repr(5x + 5y)
   Evaluated: "5y + 5x" == "5x + 5y"
Stacktrace:
 [1] macro expansion
   @ /opt/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:477 [inlined]
 [2] macro expansion
   @ ~/.julia/packages/SymbolicUtils/qulQp/test/polyform.jl:86 [inlined]
 [3] macro expansion
   @ /opt/julia/share/julia/stdlib/v1.9/Test/src/Test.jl:1496 [inlined]
 [4] top-level scope
   @ ~/.julia/packages/SymbolicUtils/qulQp/test/polyform.jl:83
Test Summary: | Pass  Fail  Total  Time
as_polynomial |    3     1      4  7.1s
ERROR: LoadError: Some tests did not pass: 3 passed, 1 failed, 0 errored, 0 broken.
in expression starting at /home/pkgeval/.julia/packages/SymbolicUtils/qulQp/test/polyform.jl:81
in expression starting at /home/pkgeval/.julia/packages/SymbolicUtils/qulQp/test/runtests.jl:24

FAILED: Package SymbolicUtils errored during testing