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):
91
91
prefix = prefixer .create_prefix ()
92
92
path = f"gs://{ bucket } /{ prefix } /"
93
93
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 )
97
100
98
101
99
102
@pytest .fixture (scope = "session" )
Original file line number Diff line number Diff line change @@ -664,25 +664,17 @@ def test_rename(scalars_dfs):
664
664
def test_df_peek (scalars_dfs_maybe_ordered ):
665
665
scalars_df , scalars_pandas_df = scalars_dfs_maybe_ordered
666
666
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
670
667
peek_result = scalars_df .peek (n = 3 , force = False , allow_large_results = True )
671
668
672
- assert session .slot_millis_sum - slot_millis_sum > 1000
673
669
pd .testing .assert_index_equal (scalars_pandas_df .columns , peek_result .columns )
674
670
assert len (peek_result ) == 3
675
671
676
672
677
673
def test_df_peek_with_large_results_not_allowed (scalars_dfs_maybe_ordered ):
678
674
scalars_df , scalars_pandas_df = scalars_dfs_maybe_ordered
679
675
680
- session = scalars_df ._block .session
681
- slot_millis_sum = session .slot_millis_sum
682
676
peek_result = scalars_df .peek (n = 3 , force = False , allow_large_results = False )
683
677
684
- # The metrics won't be fully updated when we call query_and_wait.
685
- assert session .slot_millis_sum - slot_millis_sum < 500
686
678
pd .testing .assert_index_equal (scalars_pandas_df .columns , peek_result .columns )
687
679
assert len (peek_result ) == 3
688
680
You can’t perform that action at this time.
0 commit comments