From 77826eeaf30406c2d63cd31bb85299e6a350fee2 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Sun, 27 Oct 2024 10:59:52 +0100 Subject: [PATCH] adding a pytest mark "cufile" for tests that requires cufile --- python/kvikio/pyproject.toml | 3 +++ python/kvikio/tests/test_cufile_driver.py | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/kvikio/pyproject.toml b/python/kvikio/pyproject.toml index 25a961a858..7922f173ce 100644 --- a/python/kvikio/pyproject.toml +++ b/python/kvikio/pyproject.toml @@ -144,3 +144,6 @@ filterwarnings = [ "ignore:Jitify is performing a one-time only warm-up to populate the persistent cache", "ignore::DeprecationWarning:botocore.*", ] +markers = [ + "cufile: tests to skip if cuFile isn't available e.g. run with `pytest -m 'not cufile'`" +] diff --git a/python/kvikio/tests/test_cufile_driver.py b/python/kvikio/tests/test_cufile_driver.py index b0cf267bd1..0a64bf0952 100644 --- a/python/kvikio/tests/test_cufile_driver.py +++ b/python/kvikio/tests/test_cufile_driver.py @@ -1,10 +1,12 @@ # Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved. # See file LICENSE for terms. +import pytest + import kvikio.cufile_driver -import kvikio.defaults +@pytest.mark.cufile def test_open_and_close(): kvikio.cufile_driver.driver_open() kvikio.cufile_driver.driver_close()