Skip to content

Commit c45086b

Browse files
committed
fix
1 parent 02d8186 commit c45086b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

src/persistence.jl

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ julia> using MetaGraphs
3333
julia> using LightGraphs
3434
3535
julia> test_graph = meta_graph(DiGraph(),
36-
AtVertex = Dict{Symbol, String},
37-
AtEdge = Dict{Symbol, String},
38-
graph_meta = (tag_1 = true, tag_2 = true)
36+
AtVertex = Dict{Symbol, Any},
37+
AtEdge = Dict{Symbol, Any},
38+
graph_meta = (tagged = true,)
3939
);
4040
41-
julia> push!(test_graph, Dict(:name => "a")); push!(test_graph, Dict(:name => "b"));
41+
julia> push!(test_graph, Dict(:name => "a", :number => 1));
42+
43+
julia> push!(test_graph, Dict(:name => "b", :number => 2));
4244
4345
julia> test_graph[Edge(1, 2)] = Dict(:name => "ab");
4446
@@ -47,10 +49,9 @@ julia> mktemp() do file, io
4749
print(read(file, String))
4850
end
4951
digraph {
50-
tag_1 = true
51-
tag_2 = true
52-
1 [name = "a"]
53-
2 [name = "b"]
52+
tagged = true
53+
1 [name = "a", number = 1]
54+
2 [name = "b", number = 2]
5455
1 -> 2 [name = "ab"]
5556
}
5657
```

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ rock_paper_scissors_copy = copy(rock_paper_scissors)
4141
@test has_vertex(rock_paper_scissors, rock)
4242
@test issubset(rock_paper, rock_paper_scissors)
4343
@test SimpleDiGraph(rock_paper_scissors) isa SimpleDiGraph
44+
@test is_directed(rock_paper_scissors)
4445
end
4546

4647
@testset "Double check deletion" begin

0 commit comments

Comments
 (0)