From 8b0c052cc60c7ff2671bb2ff282e1e2c07803d5e Mon Sep 17 00:00:00 2001 From: Michael McKinsey Date: Wed, 22 Jan 2025 13:36:39 -0600 Subject: [PATCH 1/2] Skip unit test if seaborn not installed --- thicket/tests/test_display.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/thicket/tests/test_display.py b/thicket/tests/test_display.py index 44336973..b4571693 100644 --- a/thicket/tests/test_display.py +++ b/thicket/tests/test_display.py @@ -9,6 +9,15 @@ import thicket as th +seaborn_avail = True +try: + import seaborn as sns +except: + seaborn_avail = False + +if not seaborn_avail: + pytest.skip("seaborn package not available", allow_module_level=True) + def test_display_histogram(rajaperf_seq_O3_1M_cali, intersection, fill_perfdata): tk = th.Thicket.from_caliperreader( From 2468f0918c777cb165514a3869128be7c3d5d1e0 Mon Sep 17 00:00:00 2001 From: Michael McKinsey Date: Thu, 23 Jan 2025 15:30:50 -0600 Subject: [PATCH 2/2] Address flake issues --- thicket/tests/test_display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thicket/tests/test_display.py b/thicket/tests/test_display.py index b4571693..526be721 100644 --- a/thicket/tests/test_display.py +++ b/thicket/tests/test_display.py @@ -11,8 +11,8 @@ seaborn_avail = True try: - import seaborn as sns -except: + import seaborn # noqa: F401 +except ModuleNotFoundError: seaborn_avail = False if not seaborn_avail: