Skip to content

Commit

Permalink
FIX: graphml tests
Browse files Browse the repository at this point in the history
Changes graphml tests to use EzXML rather than relying on line count, which could change based on factors outside of the data sets.
  • Loading branch information
pseudocubic committed Nov 17, 2023
1 parent 30393fa commit 9c8387b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/graphml.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
@test length(graph.edge) == 6

save_graphml("../test/data/ieee13_nested.graphml", eng; type="nested")
open("../test/data/ieee13_nested.graphml", "r") do io
@test length(readlines(io)) == 1533
end
@test length(EzXML.nodes(EzXML.nodes(EzXML.readxml("../test/data/ieee13_nested.graphml").node)[1])) == 185
rm("../test/data/ieee13_nested.graphml")
end

Expand All @@ -19,9 +17,7 @@
@test length(graph.edge) == 57

save_graphml("../test/data/ieee13_unnested.graphml", eng; type="unnested")
open("../test/data/ieee13_unnested.graphml", "r") do io
@test length(readlines(io)) == 1503
end
@test length(EzXML.nodes(EzXML.nodes(EzXML.readxml("../test/data/ieee13_unnested.graphml").node)[1])) == 185
rm("../test/data/ieee13_unnested.graphml")
end
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Distributed.addprocs(3)
# cd("test"); import Gurobi; using PowerModelsONM

import JSON
import EzXML
import PowerModelsDistribution as PMD

import Juniper
Expand Down

0 comments on commit 9c8387b

Please sign in to comment.