diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py index f85beca..f202b9d 100644 --- a/tests/test_pipeline.py +++ b/tests/test_pipeline.py @@ -186,14 +186,19 @@ def test_run_train_job_no_topn_map_for_physical_target(tmp_path, data): assert loaded.topn_maps == {} +@pytest.mark.filterwarnings("ignore::DeprecationWarning:multiprocessing.popen_fork") def test_run_train_job_warns_when_num_workers_exceeds_shared_quota( tmp_path, data, monkeypatch ): + # num_workers>0 makes DataLoader actually fork worker subprocesses + # (unlike every other test here, which runs with num_workers=0) — pytest + # itself is multi-threaded, hence Python's fork-safety warning below. monkeypatch.setattr("giant.pipeline.os.cpu_count", lambda: 8) # quota = 2 echo = _run(data, tmp_path / "out", num_workers=3) assert any("num-workers=3" in m and "exceeds" in m for m in echo) +@pytest.mark.filterwarnings("ignore::DeprecationWarning:multiprocessing.popen_fork") def test_run_train_job_no_warning_when_num_workers_within_shared_quota( tmp_path, data, monkeypatch ):