diff --git a/duckdb-pgq b/duckdb-pgq index 65a432e9..8bd29f5a 160000 --- a/duckdb-pgq +++ b/duckdb-pgq @@ -1 +1 @@ -Subproject commit 65a432e96b0ea3eba1d8c56decf1efeff76f2ea0 +Subproject commit 8bd29f5ac550cc57ded6073d6a9629133f137206 diff --git a/test/python/duckpgq_test.py b/test/python/duckpgq_test.py index 942e5639..c14780da 100644 --- a/test/python/duckpgq_test.py +++ b/test/python/duckpgq_test.py @@ -2,22 +2,28 @@ import os import pytest + # Get a fresh connection to DuckDB with the duckpgq extension binary loaded @pytest.fixture def duckdb_conn(): extension_binary = os.getenv('DUCKPGQ_EXTENSION_BINARY_PATH') - if (extension_binary == ''): + if extension_binary == '': raise Exception('Please make sure the `DUCKPGQ_EXTENSION_BINARY_PATH` is set to run the python tests') conn = duckdb.connect('', config={'allow_unsigned_extensions': 'true'}) conn.execute(f"load '{extension_binary}'") return conn + def test_duckpgq(duckdb_conn): - duckdb_conn.execute("SELECT duckpgq('Sam') as value;"); + duckdb_conn.execute("SELECT duckpgq('Sam') as value;") res = duckdb_conn.fetchall() - assert(res[0][0] == "Duckpgq Sam 🐥"); + assert (res[0][0] == "Duckpgq Sam 🐥"); + -def test_duckpgq_openssl_version_test(duckdb_conn): - duckdb_conn.execute("SELECT duckpgq_openssl_version('Michael');"); +def test_property_graph(duckdb_conn): + duckdb_conn.execute("CREATE TABLE foo(i bigint)") + duckdb_conn.execute("INSERT INTO foo(i) VALUES (1)") + duckdb_conn.execute("-CREATE PROPERTY GRAPH t VERTEX TABLES (foo);") + duckdb_conn.execute("-FROM GRAPH_TABLE(t MATCH (f:foo))") res = duckdb_conn.fetchall() - assert(res[0][0][0:51] == "Duckpgq Michael, my linked OpenSSL version is OpenSSL"); \ No newline at end of file + assert (res[0][0] == 1)