Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions python/cudf/cudf/tests/input_output/test_s3.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2020-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

import subprocess
import sys
import uuid
from io import BytesIO, StringIO

Expand Down Expand Up @@ -481,15 +479,3 @@ def test_write_chunked_parquet(s3_bucket_public, s3so):
actual.sort_values(["b"]).reset_index(drop=True),
cudf.concat([df1, df2]).sort_values(["b"]).reset_index(drop=True),
)


def test_no_s3fs_on_cudf_import():
output = subprocess.check_call(
[
sys.executable,
"-c",
"import cudf, sys; assert 'pyarrow._s3fs' not in sys.modules",
],
cwd="/",
)
assert output == 0
16 changes: 13 additions & 3 deletions python/cudf/cudf/tests/test_no_device.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
# SPDX-FileCopyrightText: Copyright (c) 2024-2025, NVIDIA CORPORATION.
# SPDX-FileCopyrightText: Copyright (c) 2024-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
import subprocess
import sys


def test_cudf_import_no_device(monkeypatch):
def test_cudf_import_invariants(monkeypatch):
with monkeypatch.context() as m:
# Importing cuDF must not require a visible CUDA device.
m.setenv("CUDA_VISIBLE_DEVICES", "-1")
output = subprocess.check_call(
[sys.executable, "-c", "import cudf"],
[
sys.executable,
"-c",
(
"import cudf, sys; "
# Importing cuDF must not eagerly load PyArrow's optional
# S3 extension module.
"assert 'pyarrow._s3fs' not in sys.modules"
),
],
cwd="/",
)
assert output == 0
Loading