File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -296,6 +296,12 @@ def test_download_dataset_larger_than_200k_rows(self):
296
296
df = gbq .read_gbq ("SELECT id FROM [publicdata:samples.wikipedia] GROUP EACH BY id ORDER BY id ASC LIMIT 200005" , project_id = PROJECT_ID )
297
297
self .assertEqual (len (df .drop_duplicates ()), 200005 )
298
298
299
+ def test_zero_rows (self ):
300
+ df = gbq .read_gbq ("SELECT * FROM [publicdata:samples.wikipedia] where timestamp=-9999999" , project_id = PROJECT_ID )
301
+ tm .assertIs (df , DataFrame , "Zero rows result should be dataframe." )
302
+ self .assertEqual (len (df ), 0 )
303
+
304
+
299
305
class TestToGBQIntegration (tm .TestCase ):
300
306
# This class requires bq.py to be installed for setup/teardown.
301
307
# It will also need to be preconfigured with a default dataset,
You can’t perform that action at this time.
0 commit comments