Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fize Jacques
GMatch4py
Commits
e2434cdd
Commit
e2434cdd
authored
Feb 06, 2019
by
Fize Jacques
Browse files
mod Travis.yml +test.py
parent
f54aa527
Changes
2
Hide whitespace changes
Inline
Side-by-side
.travis.yml
View file @
e2434cdd
...
...
@@ -10,4 +10,4 @@ install:
-
python setup.py build_ext --inplace
script
:
-
pytest
\ No newline at end of file
-
pytest gmatch4py/test/test.py
\ No newline at end of file
gmatch4py/test/test.py
View file @
e2434cdd
...
...
@@ -4,8 +4,7 @@ import pytest
def
nimport
():
# Gmatch4py use networkx graph
import
networkx
as
nx
# import the GED using the munkres algorithm
import
gmatch4py
as
gm
def
test_import
():
nimport
()
...
...
@@ -13,14 +12,7 @@ def test_import():
def
ged
():
import
networkx
as
nx
# import the GED using the munkres algorithm
import
gmatch4py
as
gm
g1
=
nx
.
complete_bipartite_graph
(
5
,
4
)
g2
=
nx
.
complete_bipartite_graph
(
6
,
4
)
ged
=
gm
.
GraphEditDistance
(
1
,
1
,
1
,
1
)
# all edit costs are equal to 1
assert
ged
.
compare
([
g1
,
g2
],
None
).
all
()
==
ged
.
compare
([
g1
,
g2
],
None
).
all
()
ged
=
gm
.
HED
(
1
,
1
,
1
,
1
)
# all edit costs are equal to 1
assert
ged
.
compare
([
g1
,
g2
],
None
).
all
()
==
ged
.
compare
([
g1
,
g2
],
None
).
all
()
def
test_ged
():
ged
()
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment