Skip to content

Commit

Permalink
added basic system test
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Jan 16, 2025
1 parent 63052cd commit 697226c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/system/data/test_system_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -1014,3 +1014,16 @@ async def test_literal_value_filter(
assert len(row_list) == bool(
expect_match
), f"row {type(cell_value)}({cell_value}) not found with {type(filter_input)}({filter_input}) filter"

@CrossSync.pytest
@pytest.mark.usefixtures("client")
@CrossSync.Retry(
predicate=retry.if_exception_type(ClientError), initial=1, maximum=5
)
async def test_execute_query_simple(self, client, table_id, instance_id):
result = await client.execute_query("SELECT 1 AS a, 'foo' AS b", instance_id)
rows = [r async for r in result]
assert len(rows) == 1
row = rows[0]
assert row["a"] == 1
assert row["b"] == "foo"
12 changes: 12 additions & 0 deletions tests/system/data/test_system_autogen.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,3 +826,15 @@ def test_literal_value_filter(
assert len(row_list) == bool(
expect_match
), f"row {type(cell_value)}({cell_value}) not found with {type(filter_input)}({filter_input}) filter"

@pytest.mark.usefixtures("client")
@CrossSync._Sync_Impl.Retry(
predicate=retry.if_exception_type(ClientError), initial=1, maximum=5
)
def test_execute_query_simple(self, client, table_id, instance_id):
result = client.execute_query("SELECT 1 AS a, 'foo' AS b", instance_id)
rows = [r for r in result]
assert len(rows) == 1
row = rows[0]
assert row["a"] == 1
assert row["b"] == "foo"

0 comments on commit 697226c

Please sign in to comment.