【问题标题】:julia 1.0 installation tests - nix-pkgs - ubuntujulia 1.0 安装测试 - nix-pkgs - ubuntu
【发布时间】:2018-09-01 13:56:12
【问题描述】:

我的笔记本电脑:

Linux g-TP 4.13.0-26-generic #29~16.04.2-Ubuntu SMP 1 月 9 日星期二 22:00:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

我通过nix-env安装了julia,得到如下测试结果

Test Summary: |     Pass  Broken     Total
  Overall     | 37420635  327815  37748450
    SUCCESS

我可以/应该做些什么来解决 327815 损坏的测试?

【问题讨论】:

标签: julia ubuntu-16.04 nixpkgs


【解决方案1】:

标记为损坏的测试(带有@test_broke)不会导致测试失败,所有测试都通过了,如输出中的SUCCESS 所示。

来自@test_broken的文档:

help?> @test_broken
  @test_broken ex

  Indicates a test that should pass but currently consistently fails.
  Tests that the expression ex evaluates to false or causes an exception.
  Returns a Broken Result if it does, or an Error Result if the expression evaluates to true.

例子:

julia> using Test

julia> @testset begin
           @test 1 == 1 # results in a Pass
           @test 1 == 2 # results in a Fail
           @test_broken 1 == 2 # results in a Broken
       end

Test Summary: | Pass  Fail  Broken  Total
test set      |    1     1       1      3
ERROR: Some tests did not pass: 1 passed, 1 failed, 0 errored, 1 broken.

【讨论】:

  • 第二次执行我得到:错误:LoadError: Some tests did not pass: 1 passed, 1 failed, 0 errored, 1 broken. in expression starting at /home/user/Julia/test_Julia.jl:3,然后是 Test.jl:847 顶级范围的 Finish(::Test.DefaultTestSet) Test.jl:1088 include_string(::模块,::String, ::String) 在 loading.jl:1002 (::getfield(Atom, Symbol("##120#125")){String,String,Module})() 在 eval.jl:120 withpath(::getfield(Atom, Symbol("##120#125")){String,String,Module}, ::String) at utils.jl:30 withpath at eval.jl:46 [inlined] #119 at eval.jl:117 [内联] hideprompt(::getfield(Ato
猜你喜欢
  • 1970-01-01
  • 2020-01-18
  • 1970-01-01
  • 2017-06-08
  • 2015-01-24
  • 2019-01-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多