Skip to content

Commit 4737fe4

Browse files
committed
Add initial test of inheritance of descriptive names
1 parent 3751427 commit 4737fe4

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

test/test_interactivity.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,26 @@ pin_plot_button = get_button(gui, :pin_plot)
9292
@test descriptive_names[:variables][:trans_cap_rem] == str6
9393
EMGUI.close(gui2)
9494
end
95+
96+
@testset "Test inheritance of descriptive names" begin
97+
path_to_descriptive_names = joinpath(pkgdir(EMGUI), "src", "descriptive_names.yml")
98+
descriptive_names_raw =
99+
YAML.load_file(path_to_descriptive_names; dicttype = Dict{Symbol,Any})
100+
str1 = "Relative fixed operating expense per installed capacity"
101+
gui2 = GUI(
102+
case;
103+
path_to_descriptive_names = path_to_descriptive_names,
104+
)
105+
@test descriptive_names_raw[:structures][:Node][:opex_fixed] == str1
106+
@test :StorCapOpexFixed keys(descriptive_names_raw[:structures])
107+
@test :RefNetworkNode keys(descriptive_names_raw[:structures])
108+
109+
descriptive_names = EMGUI.get_var(gui2, :descriptive_names)
110+
@test :Node keys(descriptive_names[:structures])
111+
@test descriptive_names[:structures][:StorCapOpexFixed][:opex_fixed] == str1
112+
@test descriptive_names[:structures][:RefNetworkNode][:opex_fixed] == str1
113+
EMGUI.close(gui2)
114+
end
95115
end
96116

97117
# Test specific GUI functionalities

0 commit comments

Comments
 (0)