Skip to content

Commit e3a77e4

Browse files
committed
Add tests for empty HealthTable display to improve coverage
1 parent 6df2dd5 commit e3a77e4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/show.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@
8888

8989
@test contains(output_str, "HealthTable: 2 rows × 2 columns")
9090
end
91+
@testset "HealthTable show() empty table" begin
92+
using DataFrames
93+
using HealthBase
94+
95+
df = DataFrame()
96+
ht = HealthBase.HealthTable(df)
97+
98+
output_str = sprint(show, ht)
99+
100+
@test contains(output_str, "HealthTable: 0 rows × 0 columns")
101+
@test contains(output_str, "HealthTable is empty")
102+
end
91103

92104

93105
end

0 commit comments

Comments
 (0)