Skip to content

Commit 8d257b6

Browse files
committed
Use importorskip
1 parent 7b1057f commit 8d257b6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

cuda_bindings/tests/test_graphics_apis.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
33

4-
from cuda.bindings import runtime as cudart
5-
6-
try:
7-
import PySide6
8-
except ImportError:
9-
PySide6 = None
10-
114
import pytest
5+
from cuda.bindings import runtime as cudart
126

137

14-
@pytest.mark.skipif(PySide6 is None, reason="PySide6 not installed")
158
def test_graphics_api_smoketest():
9+
_ = pytest.importorskip("PySide6")
1610
from PySide6 import QtGui, QtOpenGL
1711

1812
class GLWidget(QtOpenGL.QOpenGLWindow):

0 commit comments

Comments
 (0)