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
1 change: 1 addition & 0 deletions tests/test_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ def test_arrow_based_builder_download_and_prepare_as_sharded_parquet_with_max_sh
assert sum(parquet_file.metadata.num_rows for parquet_file in parquet_files) == 100


@require_beam
def test_beam_based_builder_download_and_prepare_as_parquet(tmp_path):
builder = DummyBeamBasedBuilder(cache_dir=tmp_path, beam_runner="DirectRunner")
builder.download_and_prepare(file_format="parquet")
Expand Down
13 changes: 2 additions & 11 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,8 @@ def parse_flag_from_env(key, default=False):
reason="test requires torchaudio>=0.12",
)


def require_beam(test_case):
"""
Decorator marking a test that requires Apache Beam.

These tests are skipped when Apache Beam isn't installed.

"""
if not config.TORCH_AVAILABLE:
test_case = unittest.skip("test requires PyTorch")(test_case)
return test_case
# Beam
require_beam = pytest.mark.skipif(not config.BEAM_AVAILABLE, reason="test requires apache-beam")


def require_faiss(test_case):
Expand Down