π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
tests: exclude onnxruntime import-time warnings from the no-warnings gate (#3899)
Dmytro Mishkin3968012017ad
diff --git a/tests/test_import.py b/tests/test_import.pyindex 52692264c..93908b816 100644--- a/tests/test_import.py+++ b/tests/test_import.py@@ -70,12 +70,19 @@ def test_import_emits_no_warnings():"""script = textwrap.dedent("""+ import contextlibimport warningswarnings.resetwarnings()import torch # noqa: F401 # torch's own import warnings are not kornia's to fix+ # Same for onnxruntime, which kornia.feature.lightglue_onnx imports eagerly when+ # installed: its import-time platform warnings (e.g. "Unsupported Windows version+ # (2025server)" on windows-2025 runners) are not kornia's to fix either.+ with contextlib.suppress(ImportError):+ import onnxruntime # noqa: F401+warnings.simplefilter("error")import kornia # noqa: F401"""