From c479dbc2e6effb017a63ab0fd810bc3aaf91ae97 Mon Sep 17 00:00:00 2001 From: Jeremy Bejanin Date: Thu, 10 Dec 2020 16:59:19 -0500 Subject: [PATCH 1/4] fix large data structures printing test --- test/test_websocketlogger.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_websocketlogger.jl b/test/test_websocketlogger.jl index 31f7234..c0f2e3f 100644 --- a/test/test_websocketlogger.jl +++ b/test/test_websocketlogger.jl @@ -207,14 +207,14 @@ import Base.CoreLogging: Info, @testset "Limiting large data structures" begin @test genmsg("msg", a=fill(1.00001, 100,100), b=fill(2.00002, 10,10)) == - replace(""" + """ ┌ PREFIX msg │ a = │ 100×100 Array{Float64,2}: │ 1.00001 1.00001 1.00001 1.00001 … 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 - │ ⋮ ⋱ EOL + │ ⋮ ⋱ $(VERSION < v"1.1" ? " " : "") │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ b = @@ -222,11 +222,11 @@ import Base.CoreLogging: Info, │ 2.00002 2.00002 2.00002 2.00002 … 2.00002 2.00002 2.00002 │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 - │ ⋮ ⋱ EOL + │ ⋮ ⋱ $(VERSION < v"1.1" ? " " : "") │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 └ SUFFIX - """, "EOL"=>"") # EOL hack to work around git whitespace errors + """ # Limiting the amount which is printed @test genmsg("msg", a=fill(1.00001, 10,10), show_limited=false) == """ From 8130254acfaa7adc663d1ada44d47bfb73b51ea0 Mon Sep 17 00:00:00 2001 From: Jeremy Bejanin Date: Sat, 12 Dec 2020 14:37:39 -0500 Subject: [PATCH 2/4] fix logger test --- src/Logger/websocketlogger.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Logger/websocketlogger.jl b/src/Logger/websocketlogger.jl index 1d308a7..96f4c7f 100644 --- a/src/Logger/websocketlogger.jl +++ b/src/Logger/websocketlogger.jl @@ -11,6 +11,10 @@ import Base.CoreLogging: logmsg_code, _min_enabled_level, current_logger_for_env, logging_error +if VERSION >= v"1.1" + import Base.CoreLogging: _invoked_shouldlog +end + import Base.string_with_env const Wslog = LogLevel(50) """ From f1d00a6d518499bc5fc709324c4632b7fdd29212 Mon Sep 17 00:00:00 2001 From: Jeremy Bejanin Date: Sat, 12 Dec 2020 14:56:45 -0500 Subject: [PATCH 3/4] fix two printing tests on 1.6 --- test/test_websocketlogger.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_websocketlogger.jl b/test/test_websocketlogger.jl index c0f2e3f..d11d77c 100644 --- a/test/test_websocketlogger.jl +++ b/test/test_websocketlogger.jl @@ -202,7 +202,7 @@ import Base.CoreLogging: Info, │ exception = │ DivideError: integer division error │ Stacktrace: - │ [1] func1() at""") + │ $(VERSION < v"1.6" ? "" : " ")[1] func1()""") @testset "Limiting large data structures" begin @@ -210,7 +210,7 @@ import Base.CoreLogging: Info, """ ┌ PREFIX msg │ a = - │ 100×100 Array{Float64,2}: + │ 100×100 $(Matrix{Float64}): │ 1.00001 1.00001 1.00001 1.00001 … 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 @@ -218,7 +218,7 @@ import Base.CoreLogging: Info, │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ b = - │ 10×10 Array{Float64,2}: + │ 10×10 $(Matrix{Float64}): │ 2.00002 2.00002 2.00002 2.00002 … 2.00002 2.00002 2.00002 │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 │ 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 2.00002 @@ -232,7 +232,7 @@ import Base.CoreLogging: Info, """ ┌ PREFIX msg │ a = - │ 10×10 Array{Float64,2}: + │ 10×10 $(Matrix{Float64}): │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 │ 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 1.00001 From 1489e2239df2cbb337e803aa14bdcad636f65add Mon Sep 17 00:00:00 2001 From: Jeremy Bejanin Date: Sat, 12 Dec 2020 15:55:35 -0500 Subject: [PATCH 4/4] replace testing on 0.7 by 1.0 (LTS) & allow failure on nightly --- .travis.yml | 2 +- appveyor.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd60dfd..70b9d3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ os: - linux - osx julia: - - 0.7 - 1.0 + - 1 sudo: false notifications: email: false diff --git a/appveyor.yml b/appveyor.yml index c8c967e..5150cd5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: matrix: - - julia_version: 0.7 + - julia_version: 1.0 - julia_version: 1 - julia_version: nightly @@ -12,7 +12,7 @@ platform: # # (tests will run but not make your overall status red) matrix: allow_failures: - - julia_version: latest + - julia_version: nightly branches: only: