Skip to content

Commit

Permalink
fix more test
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-lara committed Nov 19, 2021
1 parent d941a2d commit f6a2f2d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
12 changes: 10 additions & 2 deletions test/test_power_system_table_data.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ end
# This signature is used to capture expected error logs from parsing matpower
consistency_test =
() -> begin
mpsys = PSB.build_system(PSB.MatPowerTestSystems, "matpower_RTS_GMLC_sys")
cdmsys = PSB.build_system(PSB.PSITestSystems, "test_RTS_GMLC_sys")
mpsys = PSB.build_system(
PSB.MatPowerTestSystems,
"matpower_RTS_GMLC_sys";
force_build = true,
)
cdmsys = PSB.build_system(
PSB.PSITestSystems,
"test_RTS_GMLC_sys";
force_build = true,
)
mp_iter = get_components(HydroGen, mpsys)
mp_generators = LazyDictFromIterator(String, HydroGen, mp_iter, get_name)
for cdmgen in get_components(HydroGen, cdmsys)
Expand Down
18 changes: 15 additions & 3 deletions test/test_powersystemconstructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,16 @@ end

@testset "Test System constructor from Matpower" begin
# Include a System kwarg to make sure it doesn't get forwarded to PM functions.
sys =
PSB.build_system(PSB.MatPowerTestSystems, "matpower_case5_re_sys"; runchecks = true)
kwarg_test =
() -> begin
sys = PSB.build_system(
PSB.MatPowerTestSystems,
"matpower_case5_re_sys";
runchecks = true,
force_build = true,
)
end
@test_logs (:error,) min_level = Logging.Error match_mode = :any kwarg_test()
end

@testset "Test accessor functions of PowerSystems auto-generated types" begin
Expand Down Expand Up @@ -116,7 +124,11 @@ end
# This signature is used to capture expected error logs from parsing matpower
test_conversion =
() -> begin
sys = PSB.build_system(PSB.MatPowerTestSystems, "matpower_case5_re_sys")
sys = PSB.build_system(
PSB.MatPowerTestSystems,
"matpower_case5_re_sys";
force_build = true,
)
l = get_component(Line, sys, "bus2-bus3-i_4")
initial_time = Dates.DateTime("2020-01-01T00:00:00")
dates = collect(
Expand Down

0 comments on commit f6a2f2d

Please sign in to comment.