From 1d740caf8fe3ac25f2a50727c1ca27e61402c63b Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 16 Apr 2026 08:49:25 -0500 Subject: [PATCH] Fix credo warnings: length/1 on list and nested module aliases - skew_t_test: replace length(list) > 0 with list != [] - conn_case: alias DataCase, GridCache, ScoreCache at top --- test/microwaveprop_web/skew_t_test.exs | 8 ++++---- test/support/conn_case.ex | 11 +++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/test/microwaveprop_web/skew_t_test.exs b/test/microwaveprop_web/skew_t_test.exs index 0417cc5f..0a9b5dff 100644 --- a/test/microwaveprop_web/skew_t_test.exs +++ b/test/microwaveprop_web/skew_t_test.exs @@ -99,10 +99,10 @@ defmodule MicrowavepropWeb.SkewTTest do assert chart.width > 0 assert chart.height > 0 # Background grid - assert length(chart.isobars) > 0 - assert length(chart.isotherms) > 0 - assert length(chart.dry_adiabats) > 0 - assert length(chart.mixing_ratio_lines) > 0 + assert chart.isobars != [] + assert chart.isotherms != [] + assert chart.dry_adiabats != [] + assert chart.mixing_ratio_lines != [] # Traces assert chart.t_points != [] assert chart.td_points != [] diff --git a/test/support/conn_case.ex b/test/support/conn_case.ex index f6b2b828..73841e30 100644 --- a/test/support/conn_case.ex +++ b/test/support/conn_case.ex @@ -20,6 +20,9 @@ defmodule MicrowavepropWeb.ConnCase do alias Microwaveprop.Accounts alias Microwaveprop.Accounts.Scope alias Microwaveprop.AccountsFixtures + alias Microwaveprop.DataCase + alias Microwaveprop.Propagation.ScoreCache + alias Microwaveprop.Weather.GridCache using do quote do @@ -36,10 +39,10 @@ defmodule MicrowavepropWeb.ConnCase do end setup tags do - Microwaveprop.DataCase.setup_sandbox(tags) - Microwaveprop.DataCase.reset_score_files() - Microwaveprop.Weather.GridCache.clear() - Microwaveprop.Propagation.ScoreCache.clear() + DataCase.setup_sandbox(tags) + DataCase.reset_score_files() + GridCache.clear() + ScoreCache.clear() {:ok, conn: Phoenix.ConnTest.build_conn()} end