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
This commit is contained in:
parent
bcce4b4de9
commit
1d740caf8f
2 changed files with 11 additions and 8 deletions
|
|
@ -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 != []
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue