Skip to content

Commit

Permalink
centrality
Browse files Browse the repository at this point in the history
  • Loading branch information
rrossmiller committed May 9, 2024
1 parent 62e7878 commit c846eb4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test/test_centrality.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os

import pytest
import util
Expand All @@ -8,8 +7,7 @@
class TestCentrality:
feat = util.get_featurizer()
# undirected graphs
# graph_types1 = ["Empty", "Line", "Ring", "Hub_Spoke", "Tree"]
graph_types1 = ["Line"]
graph_types1 = ["Empty", "Line", "Ring", "Hub_Spoke", "Tree"]
# directed graphs
graph_types2 = [
"Line_Directed",
Expand Down Expand Up @@ -351,7 +349,9 @@ def test_article_rank(self, test_name):
baseline = json.load(f)
result = self.feat.runAlgorithm("tg_article_rank", params=params)
result = sorted(result[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"])
baseline = sorted(baseline[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"])
baseline = sorted(
baseline[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"]
)

for b in baseline:
found = False
Expand Down Expand Up @@ -381,7 +381,9 @@ def test_pagerank(self, test_name):
baseline = json.load(f)
result = self.feat.runAlgorithm("tg_pagerank", params=params)
result = sorted(result[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"])
baseline = sorted(baseline[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"])
baseline = sorted(
baseline[0]["@@top_scores_heap"], key=lambda x: x["Vertex_ID"]
)

for b in baseline:
found = False
Expand Down

0 comments on commit c846eb4

Please sign in to comment.