Skip to content

Commit 2608e1e

Browse files
authored
Add test for single row & column (#200)
* add test for single row & column * remove old comment
1 parent 428845d commit 2608e1e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/system/test_gbq.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,14 @@ def test_zero_rows(self, project_id):
421421
page_array, columns=['title', 'id', 'is_bot', 'ts'])
422422
tm.assert_frame_equal(df, expected_result, check_index_type=False)
423423

424+
def test_one_row_one_column(self, project_id):
425+
df = gbq.read_gbq("SELECT 3 as v",
426+
project_id=project_id,
427+
private_key=self.credentials,
428+
dialect='standard')
429+
expected_result = DataFrame(dict(v=[3]))
430+
tm.assert_frame_equal(df, expected_result)
431+
424432
def test_legacy_sql(self, project_id):
425433
legacy_sql = "SELECT id FROM [publicdata.samples.wikipedia] LIMIT 10"
426434

0 commit comments

Comments
 (0)