From 750b5316c7db7e7bf977b0627051db8f96e1e775 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 23 Apr 2024 16:31:41 +0200 Subject: [PATCH] mark optional import with pytest --- cf_units/tests/integration/parse/test_graph.py | 3 +++ cf_units/tests/integration/parse/test_parse.py | 3 +++ cf_units/tests/test_tex.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/cf_units/tests/integration/parse/test_graph.py b/cf_units/tests/integration/parse/test_graph.py index c48de9ad..9743b8a0 100644 --- a/cf_units/tests/integration/parse/test_graph.py +++ b/cf_units/tests/integration/parse/test_graph.py @@ -2,6 +2,9 @@ # # This file is part of cf-units and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. +import pytest + +antlr4 = pytest.importorskip("antlr4") import cf_units._udunits2_parser.graph as g from cf_units._udunits2_parser import parse diff --git a/cf_units/tests/integration/parse/test_parse.py b/cf_units/tests/integration/parse/test_parse.py index d42b7a36..bbeec4c5 100644 --- a/cf_units/tests/integration/parse/test_parse.py +++ b/cf_units/tests/integration/parse/test_parse.py @@ -2,6 +2,9 @@ # # This file is part of cf-units and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. +import pytest + +antlr4 = pytest.importorskip("antlr4") import re diff --git a/cf_units/tests/test_tex.py b/cf_units/tests/test_tex.py index ce3977ad..966c887a 100644 --- a/cf_units/tests/test_tex.py +++ b/cf_units/tests/test_tex.py @@ -2,6 +2,9 @@ # # This file is part of cf-units and is released under the BSD license. # See LICENSE in the root of the repository for full licensing details. +import pytest + +antlr4 = pytest.importorskip("antlr4") from cf_units.tex import tex