Skip to content

Commit

Permalink
Added unit test for 4 types of anyburl rules: Updated graphml path
Browse files Browse the repository at this point in the history
  • Loading branch information
jaikrishnap98 committed Jun 18, 2024
1 parent 8c750bf commit 2a23a8b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_anyBurl_infer_edges_rules.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pyreason as pr

def test_anyBurl_rule_1():
graph_path = 'knowledge_graph_test_subset.graphml'
graph_path = './tests/knowledge_graph_test_subset.graphml'
pr.reset()
pr.reset_rules()
# Modify pyreason settings to make verbose and to save the rule trace to a file
Expand Down Expand Up @@ -33,7 +33,7 @@ def test_anyBurl_rule_1():
assert ('Vnukovo_International_Airport', 'Riga_International_Airport') in dataframes[1]['component'].values.tolist() and dataframes[1]['isConnectedTo'].iloc[0] == [1, 1], '(Vnukovo_International_Airport, Riga_International_Airport) should have isConnectedTo bounds [1,1] for t=1 timesteps'

def test_anyBurl_rule_2():
graph_path = 'knowledge_graph_test_subset.graphml'
graph_path = './tests/knowledge_graph_test_subset.graphml'
pr.reset()
pr.reset_rules()
# Modify pyreason settings to make verbose and to save the rule trace to a file
Expand Down Expand Up @@ -66,7 +66,7 @@ def test_anyBurl_rule_2():
assert ('Riga_International_Airport', 'Vnukovo_International_Airport') in dataframes[1]['component'].values.tolist() and dataframes[1]['isConnectedTo'].iloc[0] == [1, 1], '(Riga_International_Airport, Vnukovo_International_Airport) should have isConnectedTo bounds [1,1] for t=1 timesteps'

def test_anyBurl_rule_3():
graph_path = 'knowledge_graph_test_subset.graphml'
graph_path = './tests/knowledge_graph_test_subset.graphml'
pr.reset()
pr.reset_rules()
# Modify pyreason settings to make verbose and to save the rule trace to a file
Expand Down Expand Up @@ -99,7 +99,7 @@ def test_anyBurl_rule_3():
assert ('Vnukovo_International_Airport', 'Yali') in dataframes[1]['component'].values.tolist() and dataframes[1]['isConnectedTo'].iloc[0] == [1, 1], '(Vnukovo_International_Airport, Yali) should have isConnectedTo bounds [1,1] for t=1 timesteps'

def test_anyBurl_rule_4():
graph_path = 'knowledge_graph_test_subset.graphml'
graph_path = './tests/knowledge_graph_test_subset.graphml'
pr.reset()
pr.reset_rules()
# Modify pyreason settings to make verbose and to save the rule trace to a file
Expand Down

0 comments on commit 2a23a8b

Please sign in to comment.