Skip to content

Commit 0668d07

Browse files
committed
Fix test
1 parent 8b9b6a2 commit 0668d07

File tree

3 files changed

+22
-7
lines changed

3 files changed

+22
-7
lines changed

poetry.lock

Lines changed: 11 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ pytest = "^8.2.0"
1818
requires = ["poetry-core"]
1919
build-backend = "poetry.core.masonry.api"
2020

21+

test/test_scenario.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pathlib import Path
33
import networkx as nx
44

5-
from gephipy import gephipy
5+
from gephipy import gephipy
66

77
# Must be imported after gephipy
88
from org.gephi.layout.plugin.forceAtlas2 import ForceAtlas2Builder
@@ -79,11 +79,15 @@ def test_scenario():
7979

8080
# FA2 layout
8181
fa2 = ForceAtlas2Builder().buildLayout()
82-
fa2.setGraphModel(gephipy.get_graph_model(workspace))
82+
fa2.setGraphModel(graphModel)
8383
fa2.resetPropertiesValues()
8484
fa2.initAlgo()
8585
for x in range(1000):
86-
fa2.goAlgo()
86+
if fa2.canAlgo():
87+
fa2.goAlgo()
88+
else:
89+
break
90+
fa2.endAlgo()
8791

8892
# Noverlap layout
8993
noverlap = NoverlapLayoutBuilder().buildLayout()
@@ -105,8 +109,9 @@ def test_scenario():
105109
gephipy.export_pdf(workspace, "test-export-graph.pdf")
106110
file = Path("./test-export-graph.pdf")
107111
assert file.is_file() == True
108-
112+
109113
# PNG requires a display ?
110114
# gephipy.export_png(workspace, "test-export-graph.png")
111115
# file = Path("./test-export-graph.png")
112-
# assert file.is_file() == True
116+
# assert file.is_file() == True
117+

0 commit comments

Comments
 (0)