From 693a8affb01d646acdb3faa90e681b8d4f54f442 Mon Sep 17 00:00:00 2001 From: Will Barnes Date: Tue, 14 May 2024 11:40:43 -0400 Subject: [PATCH] move pytest import to avoid needing it in docs build --- fiasco/tests/idl/helpers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fiasco/tests/idl/helpers.py b/fiasco/tests/idl/helpers.py index 03d0b718..7cadd1e4 100644 --- a/fiasco/tests/idl/helpers.py +++ b/fiasco/tests/idl/helpers.py @@ -2,7 +2,6 @@ Helpers for tests related to comparing with IDL output """ import pathlib -import pytest from astropy.utils.data import get_pkg_data_path @@ -61,6 +60,8 @@ def run_idl_script(idl_env, script, input_args, save_vars, file_name, version, f file_path = get_idl_test_output_filepath(file_name, version) if not file_path.is_file(): if idl_env is None: + # Import here so that this can be used without a hard pytest dependency + import pytest pytest.skip("""To run the IDL comparison tests, you must: 1. Specify a path to a working IDL executable, 2. Specify a path to the CHIANTI IDL code,