Skip to content

Commit 6060741

Browse files
committed
improve tests: all in one outer testset, show test progress
1 parent 630d63a commit 6060741

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

test/plot_structure.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using ViennaRNA: Pairtable
44

55
# TODO: simplify tests
66
@testset "plot_structure" begin
7+
showtestset()
78
w = "((((.....))))."
89
s = "GGCGAAUACCGCCU"
910
@test plot_structure(w) isa Luxor.Drawing

test/plot_structure_makie.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using CairoMakie: Makie
22

33
@testset "plot_structure_makie" begin
4+
showtestset()
45
w = "((((.....))))."
56
s = "GGCGAAUACCGCCU"
67
@test PlotRNA.plot_structure_makie(w) isa Makie.Figure

test/r2r.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ MSA{Char}(; seq = Dict("a" => "GAAAC", "b" => "UAAAA"),
1818
]
1919

2020
@testset "R2R.r2r" begin
21+
showtestset()
2122
Tres = Tuple{Int, String, String, String}
2223
for msa in R2R_MSA
2324
@test R2R.r2r(msa) isa Tres
2425
end
2526
end
2627

2728
@testset "R2R.plot" begin
29+
showtestset()
2830
Tres = R2Rplot
2931
for msa in R2R_MSA
3032
@test R2R.plot(msa) isa Tres

test/runtests.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
using Test
22

3-
include("plot_structure.jl")
4-
include("varna.jl")
5-
include("r2r.jl")
6-
include("plot_structure_makie.jl")
3+
# show which testset is currently running
4+
showtestset() = println(" "^(2 * Test.get_testset_depth()), "testing ",
5+
Test.get_testset().description)
6+
7+
@testset verbose=true "PlotRNA" begin
8+
showtestset()
9+
include("plot_structure.jl")
10+
include("varna.jl")
11+
include("r2r.jl")
12+
include("plot_structure_makie.jl")
13+
end

test/varna.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const file_endings_to_mime = VARNA._map_fileendings_to_mime
66
# - test verbose option
77

88
@testset "VARNA.plot" begin
9+
showtestset()
910
# basic usage
1011
for kwargs in [(;), (; seq="GCGAAACGC")]
1112
vp = VARNA.plot("(((...)))"; kwargs...)
@@ -43,6 +44,7 @@ const file_endings_to_mime = VARNA._map_fileendings_to_mime
4344
end
4445

4546
@testset "VARNA.plot_compare" begin
47+
showtestset()
4648
# basic usage
4749
vp = VARNA.plot_compare(dbn1="(((.....)))", seq1="GCGAAAAACGC",
4850
dbn2="((-...---))", seq2="GG-AAA---CC")

0 commit comments

Comments
 (0)