From 46f95dfa9f6edb206b7ae352e5416c565ae3ed26 Mon Sep 17 00:00:00 2001 From: Merlin Fisher-Levine Date: Mon, 28 Oct 2024 14:34:40 -0700 Subject: [PATCH] Fix tests in Jenkins --- tests/test_animation.py | 3 +++ tests/test_focusAnalysis.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/tests/test_animation.py b/tests/test_animation.py index 5328b70..69af09c 100644 --- a/tests/test_animation.py +++ b/tests/test_animation.py @@ -27,6 +27,7 @@ import lsst.utils.tests from lsst.summit.extras.animation import Animator from lsst.summit.utils.butlerUtils import makeDefaultLatissButler +from lsst.summit.utils.utils import getSite class AnimationTestCase(lsst.utils.tests.TestCase): @@ -37,6 +38,8 @@ def setUpClass(cls): raise unittest.SkipTest("Skipping tests that require ffmpeg.") try: + if getSite() == "jenkins": + raise unittest.SkipTest("Skip running butler-driven tests in Jenkins.") cls.butler = makeDefaultLatissButler() except FileNotFoundError: raise unittest.SkipTest("Skipping tests that require the LATISS butler repo.") diff --git a/tests/test_focusAnalysis.py b/tests/test_focusAnalysis.py index 9bd454d..64ea4f8 100644 --- a/tests/test_focusAnalysis.py +++ b/tests/test_focusAnalysis.py @@ -31,12 +31,15 @@ import lsst.summit.utils.butlerUtils as butlerUtils # noqa: E402 from lsst.summit.extras import NonSpectralFocusAnalyzer, SpectralFocusAnalyzer # noqa: E402 +from lsst.summit.utils.utils import getSite # noqa: E402 class FocusAnalysisTestCase(lsst.utils.tests.TestCase): @classmethod def setUpClass(cls): try: + if getSite() == "jenkins": + raise unittest.SkipTest("Skip running butler-driven tests in Jenkins.") cls.butler = butlerUtils.makeDefaultLatissButler() except FileNotFoundError: raise unittest.SkipTest("Skipping tests that require the LATISS butler repo.") @@ -74,6 +77,8 @@ class NonSpectralFocusAnalysisTestCase(lsst.utils.tests.TestCase): @classmethod def setUpClass(cls): try: + if getSite() == "jenkins": + raise unittest.SkipTest("Skip running butler-driven tests in Jenkins.") cls.butler = butlerUtils.makeDefaultLatissButler() except FileNotFoundError: raise unittest.SkipTest("Skipping tests that require the LATISS butler repo.")