@@ -59,67 +59,6 @@ pin_plot_button = get_button(gui, :pin_plot)
5959 system = EMGUI. parse_case (case)
6060 @test Base. show (system) == dump (system; maxdepth = 1 )
6161 end
62-
63- @testset " Test customizing descriptive names" begin
64- path_to_descriptive_names = joinpath (pkgdir (EMGUI), " src" , " descriptive_names.yml" )
65- str1 = " <a test description 1>"
66- str2 = " <a test description 2>"
67- str3 = " <a test description 3>"
68- str4 = " <a test description 4>"
69- str5 = " <a test description 5>"
70- str6 = " <a test description 6>"
71- descriptive_names_dict = Dict (
72- :structures => Dict ( # Input parameter from the case Dict
73- :RefStatic => Dict (:trans_cap => str1, :opex_fixed => str2),
74- :RefDynamic => Dict (:opex_var => str3, :directions => str4),
75- ),
76- :variables => Dict ( # variables from the JuMP model
77- :stor_discharge_use => str5,
78- :trans_cap_rem => str6,
79- ),
80- )
81- gui2 = GUI (
82- case;
83- path_to_descriptive_names = path_to_descriptive_names,
84- descriptive_names_dict = descriptive_names_dict,
85- )
86- descriptive_names = EMGUI. get_var (gui2, :descriptive_names )
87- @test descriptive_names[:structures ][:RefStatic ][:trans_cap ] == str1
88- @test descriptive_names[:structures ][:RefStatic ][:opex_fixed ] == str2
89- @test descriptive_names[:structures ][:RefDynamic ][:opex_var ] == str3
90- @test descriptive_names[:structures ][:RefDynamic ][:directions ] == str4
91- @test descriptive_names[:variables ][:stor_discharge_use ] == str5
92- @test descriptive_names[:variables ][:trans_cap_rem ] == str6
93- EMGUI. close (gui2)
94- 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- str2 = " Initial stored energy in the dam"
102- gui3 = GUI (
103- case;
104- path_to_descriptive_names = path_to_descriptive_names,
105- )
106-
107- @test descriptive_names_raw[:structures ][:Node ][:opex_fixed ] == str1
108- @test :StorCapOpexFixed ∉ keys (descriptive_names_raw[:structures ])
109- @test :RefNetworkNode ∉ keys (descriptive_names_raw[:structures ])
110-
111- @test descriptive_names_raw[:structures ][:HydroStorage ][:level_init ] == str2
112- @test :HydroStor ∉ keys (descriptive_names_raw[:structures ])
113- @test :PumpedHydroStor ∉ keys (descriptive_names_raw[:structures ])
114-
115- descriptive_names = EMGUI. get_var (gui3, :descriptive_names )
116- @test descriptive_names[:structures ][:StorCapOpexFixed ][:opex_fixed ] == str1
117- @test descriptive_names[:structures ][:RefNetworkNode ][:opex_fixed ] == str1
118-
119- @test descriptive_names[:structures ][:HydroStor ][:level_init ] == str2
120- @test descriptive_names[:structures ][:PumpedHydroStor ][:level_init ] == str2
121- EMGUI. close (gui3)
122- end
12362end
12463
12564# Test specific GUI functionalities
0 commit comments