Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LinearAlgebra tests failing when run directly #25779

Closed
dlfivefifty opened this issue Jan 27, 2018 · 3 comments · Fixed by #25798
Closed

LinearAlgebra tests failing when run directly #25779

dlfivefifty opened this issue Jan 27, 2018 · 3 comments · Fixed by #25798

Comments

@dlfivefifty
Copy link
Contributor

I'm getting failed tests, even though running all the Julia tests at once works fine:

[solver-mbook:~/Projects/julia7] solver% ./julia stdlib/LinearAlgebra/test/runtests.jl 
Test Summary:                                   | Pass  Total
similar should preserve underlying storage type |   16     16
special printing of Lower/UpperTriangular: Test Failed at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542
  Expression: sprint(show, (#= /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542 =# @MIME_str("text/plain"))(), LowerTriangular(2 * ones(Int64, 3, 3))) == "3×3 LinearAlgebra.LowerTriangular{Int64,Array{Int64,2}}:\n 2  ⋅  ⋅\n 2  2  ⋅\n 2  2  2"
   Evaluated: "3×3 LowerTriangular{Int64,Array{Int64,2}}:\n 2  ⋅  ⋅\n 2  2  ⋅\n 2  2  2" == "3×3 LinearAlgebra.LowerTriangular{Int64,Array{Int64,2}}:\n 2  ⋅  ⋅\n 2  2  ⋅\n 2  2  2"
Stacktrace:
 [1] macro expansion at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542 [inlined]
 [2] macro expansion at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/Test/src/Test.jl:1007 [inlined]
 [3] top-level scope at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542
special printing of Lower/UpperTriangular: Test Failed at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:544
  Expression: sprint(show, (#= /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:544 =# @MIME_str("text/plain"))(), UnitLowerTriangular(2 * ones(Int64, 3, 3))) == "3×3 LinearAlgebra.UnitLowerTriangular{Int64,Array{Int64,2}}:\n 1  ⋅  ⋅\n 2  1  ⋅\n 2  2  1"
   Evaluated: "3×3 UnitLowerTriangular{Int64,Array{Int64,2}}:\n 1  ⋅  ⋅\n 2  1  ⋅\n 2  2  1" == "3×3 LinearAlgebra.UnitLowerTriangular{Int64,Array{Int64,2}}:\n 1  ⋅  ⋅\n 2  1  ⋅\n 2  2  1"
Stacktrace:
 [1] macro expansion at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:544 [inlined]
 [2] macro expansion at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/Test/src/Test.jl:1007 [inlined]
 [3] top-level scope at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542
special printing of Lower/UpperTriangular: Test Failed at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:546
  Expression: sprint(show, (#= /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:546 =# @MIME_str("text/plain"))(), UpperTriangular(2 * ones(Int64, 3, 3))) == "3×3 LinearAlgebra.UpperTriangular{Int64,Array{Int64,2}}:\n 2  2  2\n ⋅  2  2\n ⋅  ⋅  2"
   Evaluated: "3×3 UpperTriangular{Int64,Array{Int64,2}}:\n 2  2  2\n ⋅  2  2\n ⋅  ⋅  2" == "3×3 LinearAlgebra.UpperTriangular{Int64,Array{Int64,2}}:\n 2  2  2\n ⋅  2  2\n ⋅  ⋅  2"
Stacktrace:
 [1] macro expansion at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:546 [inlined]
 [2] macro expansion at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/Test/src/Test.jl:1007 [inlined]
 [3] top-level scope at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542
special printing of Lower/UpperTriangular: Test Failed at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:548
  Expression: sprint(show, (#= /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:548 =# @MIME_str("text/plain"))(), UnitUpperTriangular(2 * ones(Int64, 3, 3))) == "3×3 LinearAlgebra.UnitUpperTriangular{Int64,Array{Int64,2}}:\n 1  2  2\n ⋅  1  2\n ⋅  ⋅  1"
   Evaluated: "3×3 UnitUpperTriangular{Int64,Array{Int64,2}}:\n 1  2  2\n ⋅  1  2\n ⋅  ⋅  1" == "3×3 LinearAlgebra.UnitUpperTriangular{Int64,Array{Int64,2}}:\n 1  2  2\n ⋅  1  2\n ⋅  ⋅  1"
Stacktrace:
 [1] macro expansion at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:548 [inlined]
 [2] macro expansion at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/Test/src/Test.jl:1007 [inlined]
 [3] top-level scope at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:542
Test Summary:                             | Fail  Total
special printing of Lower/UpperTriangular |    4      4
ERROR: LoadError: LoadError: Some tests did not pass: 0 passed, 4 failed, 0 errored, 0 broken.
in expression starting at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/triangular.jl:541
in expression starting at /Users/solver/Projects/julia7/stdlib/LinearAlgebra/test/runtests.jl:3
@KristofferC
Copy link
Member

Yeah, because of being available in Main and then #23806 kicks in. This has been tripping up people lately, need to figure out some good solution to it...

@dlfivefifty
Copy link
Contributor Author

A simple work around would be to have both cases in the tests

fredrikekre added a commit to fredrikekre/julia that referenced this issue Jan 29, 2018
when the types are directly available in Main the
LinearAlgebra prefix does not print

fix JuliaLang#25779
fredrikekre added a commit that referenced this issue Jan 30, 2018
when the types are directly available in Main the
LinearAlgebra prefix does not print

fix #25779
@StefanKarpinski
Copy link
Member

Also, note that I very sneakily added repr(obj, :module => nothing) (or any other IOContext pairs) to control the context to which obj is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants