File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed
Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -91,9 +91,12 @@ def gcs_folder(gcs_client: storage.Client):
9191 prefix = prefixer .create_prefix ()
9292 path = f"gs://{ bucket } /{ prefix } /"
9393 yield path
94- for blob in gcs_client .list_blobs (bucket , prefix = prefix ):
95- blob = typing .cast (storage .Blob , blob )
96- blob .delete ()
94+ try :
95+ for blob in gcs_client .list_blobs (bucket , prefix = prefix ):
96+ blob = typing .cast (storage .Blob , blob )
97+ blob .delete ()
98+ except Exception as exc :
99+ traceback .print_exception (type (exc ), exc , None )
97100
98101
99102@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change @@ -664,25 +664,17 @@ def test_rename(scalars_dfs):
664664def test_df_peek (scalars_dfs_maybe_ordered ):
665665 scalars_df , scalars_pandas_df = scalars_dfs_maybe_ordered
666666
667- session = scalars_df ._block .session
668- slot_millis_sum = session .slot_millis_sum
669- # allow_large_results=False needed to get slot_millis_sum statistics only
670667 peek_result = scalars_df .peek (n = 3 , force = False , allow_large_results = True )
671668
672- assert session .slot_millis_sum - slot_millis_sum > 1000
673669 pd .testing .assert_index_equal (scalars_pandas_df .columns , peek_result .columns )
674670 assert len (peek_result ) == 3
675671
676672
677673def test_df_peek_with_large_results_not_allowed (scalars_dfs_maybe_ordered ):
678674 scalars_df , scalars_pandas_df = scalars_dfs_maybe_ordered
679675
680- session = scalars_df ._block .session
681- slot_millis_sum = session .slot_millis_sum
682676 peek_result = scalars_df .peek (n = 3 , force = False , allow_large_results = False )
683677
684- # The metrics won't be fully updated when we call query_and_wait.
685- assert session .slot_millis_sum - slot_millis_sum < 500
686678 pd .testing .assert_index_equal (scalars_pandas_df .columns , peek_result .columns )
687679 assert len (peek_result ) == 3
688680
You can’t perform that action at this time.
0 commit comments