From dfe6d3c873496ce3b8749306a662a365313c6b24 Mon Sep 17 00:00:00 2001 From: Andreas Motl Date: Thu, 14 Dec 2023 06:49:11 +0100 Subject: [PATCH] Fix tests for `pueblo.ngr` Not all packages are installed on those test jobs. --- tests/test_dataframe.py | 5 ++++- tests/test_io.py | 3 ++- tests/test_proc.py | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test_dataframe.py b/tests/test_dataframe.py index 6d49fd4..fbfbcae 100644 --- a/tests/test_dataframe.py +++ b/tests/test_dataframe.py @@ -1,6 +1,9 @@ +# ruff: noqa: E402 from pathlib import Path -import pandas as pd +import pytest + +pd = pytest.importorskip("pandas") from dask.utils import is_dataframe_like from pandas._testing import raise_assert_detail diff --git a/tests/test_io.py b/tests/test_io.py index 7d5747e..47b21b9 100644 --- a/tests/test_io.py +++ b/tests/test_io.py @@ -2,9 +2,10 @@ import dataclasses import typing as t -import magic import pytest +magic = pytest.importorskip("magic") + pytest.importorskip("pathlibfs") from pathlibfs import Path as PathPlus diff --git a/tests/test_proc.py b/tests/test_proc.py index 0de480f..e9f085b 100644 --- a/tests/test_proc.py +++ b/tests/test_proc.py @@ -1,6 +1,7 @@ import pytest -from pueblo.util.proc import process +proc = pytest.importorskip("pueblo.util.proc") +process = proc.process def test_process_success(tmp_path):