Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mewim committed Jun 22, 2023
1 parent bdd6de1 commit c138ccb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions tools/python_api/test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from test_networkx import *
from test_parameter import *
from test_prepared_statement import *
from test_query_result import *
from test_query_result_close import *
from test_timeout import *
from test_torch_geometric import *
Expand Down
19 changes: 19 additions & 0 deletions tools/python_api/test/test_query_result.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
def test_get_execution_time(establish_connection):
conn, db = establish_connection
result = conn.execute("MATCH (a:person) WHERE a.ID = 0 RETURN a")
assert result.get_execution_time() > 0
result.close()


def test_get_compiling_time(establish_connection):
conn, db = establish_connection
result = conn.execute("MATCH (a:person) WHERE a.ID = 0 RETURN a")
assert result.get_compiling_time() > 0
result.close()


def test_get_num_tuples(establish_connection):
conn, db = establish_connection
result = conn.execute("MATCH (a:person) WHERE a.ID = 0 RETURN a")
assert result.get_num_tuples() == 1
result.close()

0 comments on commit c138ccb

Please sign in to comment.