Skip to content

Commit ad786a6

Browse files
committed
updated ci
1 parent 1deb5ea commit ad786a6

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

tests/pystackql_tests.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -177,34 +177,34 @@ def test_13_execute_with_csv_output(self):
177177
self.assertTrue(is_valid_csv, f"Result is not a valid CSV: {result}")
178178
print_test_result(f"Test execute with csv output\nRESULT_COUNT: {len(result.splitlines())}", is_valid_csv)
179179

180-
# class PyStackQLAsyncTests(PyStackQLTestsBase):
181-
182-
# @async_test_decorator
183-
# async def test_14_executeQueriesAsync(self):
184-
# stackql = StackQL()
185-
# results = await stackql.executeQueriesAsync(async_queries)
186-
# is_valid_results = all(isinstance(res, dict) for res in results)
187-
# print_test_result(f"[ASYNC] Test executeQueriesAsync with default (dict) output\nRESULT_COUNT: {len(results)}", is_valid_results)
188-
189-
# @async_test_decorator
190-
# async def test_15_executeQueriesAsync_with_pandas_output(self):
191-
# stackql = StackQL(output='pandas')
192-
# result = await stackql.executeQueriesAsync(async_queries)
193-
# is_valid_dataframe = isinstance(result, pd.DataFrame) and not result.empty
194-
# print_test_result(f"[ASYNC] Test executeQueriesAsync with pandas output\nRESULT_COUNT: {len(result)}", is_valid_dataframe)
195-
196-
# @async_test_decorator
197-
# async def test_16_executeQueriesAsync_with_csv_output(self):
198-
# stackql = StackQL(output='csv')
199-
# exception_caught = False
200-
# try:
201-
# # This should raise a ValueError since 'csv' output mode is not supported
202-
# await stackql.executeQueriesAsync(async_queries)
203-
# except ValueError as ve:
204-
# exception_caught = str(ve) == "executeQueriesAsync supports only 'dict' or 'pandas' output modes."
205-
# except Exception as e:
206-
# pass
207-
# print_test_result(f"[ASYNC] Test executeQueriesAsync with unsupported csv output", exception_caught)
180+
class PyStackQLAsyncTests(PyStackQLTestsBase):
181+
182+
@async_test_decorator
183+
async def test_14_executeQueriesAsync(self):
184+
stackql = StackQL()
185+
results = await stackql.executeQueriesAsync(async_queries)
186+
is_valid_results = all(isinstance(res, dict) for res in results)
187+
print_test_result(f"[ASYNC] Test executeQueriesAsync with default (dict) output\nRESULT_COUNT: {len(results)}", is_valid_results)
188+
189+
@async_test_decorator
190+
async def test_15_executeQueriesAsync_with_pandas_output(self):
191+
stackql = StackQL(output='pandas')
192+
result = await stackql.executeQueriesAsync(async_queries)
193+
is_valid_dataframe = isinstance(result, pd.DataFrame) and not result.empty
194+
print_test_result(f"[ASYNC] Test executeQueriesAsync with pandas output\nRESULT_COUNT: {len(result)}", is_valid_dataframe)
195+
196+
@async_test_decorator
197+
async def test_16_executeQueriesAsync_with_csv_output(self):
198+
stackql = StackQL(output='csv')
199+
exception_caught = False
200+
try:
201+
# This should raise a ValueError since 'csv' output mode is not supported
202+
await stackql.executeQueriesAsync(async_queries)
203+
except ValueError as ve:
204+
exception_caught = str(ve) == "executeQueriesAsync supports only 'dict' or 'pandas' output modes."
205+
except Exception as e:
206+
pass
207+
print_test_result(f"[ASYNC] Test executeQueriesAsync with unsupported csv output", exception_caught)
208208

209209
# @async_test_decorator
210210
# async def test_17_executeQueriesAsync_server_mode_default_output(self):

0 commit comments

Comments
 (0)