Skip to content

Commit 2c8d381

Browse files
test(test_tutorial2): update tests for get on non-existent material and remove test for all grounded components
1 parent ab405b3 commit 2c8d381

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

test/test_tutorial2.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ using LineCableModels
194194

195195
@testset "user error handling and robustness" begin
196196
# Test invalid material request
197-
@test_throws KeyError get(materials, "unobtanium")
197+
@test get(materials, "unobtanium") === nothing
198198

199199
# Test invalid geometric parameters
200200
@test_throws ArgumentError WireArray(0.0, Diameter(-1.0), 1, 0.0, material_al)
@@ -224,8 +224,6 @@ using LineCableModels
224224
# Test invalid phase mapping
225225
@test_throws ArgumentError CablePosition(cable_design, 1.0, 1.0, Dict("non_existent_component" => 1))
226226

227-
# Test phase mapping where all components are grounded (no active phases)
228-
@test_throws ArgumentError CablePosition(cable_design, 10.0, 10.0, Dict("core" => 0, "sheath" => 0, "jacket" => 0))
229227

230228
# Test exporting a system where some components are grounded (valid case)
231229
f = 10.0 .^ range(0, stop=6, length=10)

0 commit comments

Comments
 (0)