Skip to content

Commit

Permalink
dont change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-ho committed Feb 15, 2024
1 parent 10c5e56 commit 5dfa3d2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion daft/dataframe/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ def _populate_preview(self) -> None:
preview_results = preview_df._result
assert preview_results is not None

print("here")
preview_partition = preview_results._get_merged_vpartition()
print("not here")
self._preview = DataFramePreview(
preview_partition=preview_partition,
dataframe_num_rows=len(self),
Expand Down Expand Up @@ -1153,10 +1155,11 @@ def collect(self, num_preview_rows: Optional[int] = 8) -> "DataFrame":
self._materialize_results()

assert self._result is not None
dataframe_len = len(self._result)
if num_preview_rows is not None:
self._num_preview_rows = num_preview_rows
else:
self._num_preview_rows = len(self._result)
self._num_preview_rows = dataframe_len
return self

def _construct_show_display(self, n: int) -> "DataFrameDisplay":
Expand Down
2 changes: 0 additions & 2 deletions tests/integration/io/test_url_download_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ def test_url_download_http_error_codes(nginx_config, use_native_downloader, stat
if status_code == 404:
with pytest.raises(FileNotFoundError):
df.collect()
df.__repr__()
# When using fsspec, other error codes are bubbled up to the user as aiohttp.client_exceptions.ClientResponseError
elif not use_native_downloader:
# Ray runner has a pretty catastrophic failure when raising non-pickleable exceptions (ClientResponseError is not pickleable)
Expand All @@ -46,4 +45,3 @@ def test_url_download_http_error_codes(nginx_config, use_native_downloader, stat
# user-facing I/O error with the error code
with pytest.raises(ValueError, match=f"{status_code}") as e:
df.collect()
df.__repr__()
1 change: 0 additions & 1 deletion tests/udf_library/test_url_udfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ def test_download_with_missing_urls_reraise_errors(files, use_native_downloader)
# TODO: Change to a FileNotFound Error
with pytest.raises(FileNotFoundError):
df.collect()
df.__repr__()


@pytest.mark.parametrize("use_native_downloader", [False, True])
Expand Down

0 comments on commit 5dfa3d2

Please sign in to comment.