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.width > 0
|
||||||
assert chart.height > 0
|
assert chart.height > 0
|
||||||
# Background grid
|
# Background grid
|
||||||
assert length(chart.isobars) > 0
|
assert chart.isobars != []
|
||||||
assert length(chart.isotherms) > 0
|
assert chart.isotherms != []
|
||||||
assert length(chart.dry_adiabats) > 0
|
assert chart.dry_adiabats != []
|
||||||
assert length(chart.mixing_ratio_lines) > 0
|
assert chart.mixing_ratio_lines != []
|
||||||
# Traces
|
# Traces
|
||||||
assert chart.t_points != []
|
assert chart.t_points != []
|
||||||
assert chart.td_points != []
|
assert chart.td_points != []
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ defmodule MicrowavepropWeb.ConnCase do
|
||||||
alias Microwaveprop.Accounts
|
alias Microwaveprop.Accounts
|
||||||
alias Microwaveprop.Accounts.Scope
|
alias Microwaveprop.Accounts.Scope
|
||||||
alias Microwaveprop.AccountsFixtures
|
alias Microwaveprop.AccountsFixtures
|
||||||
|
alias Microwaveprop.DataCase
|
||||||
|
alias Microwaveprop.Propagation.ScoreCache
|
||||||
|
alias Microwaveprop.Weather.GridCache
|
||||||
|
|
||||||
using do
|
using do
|
||||||
quote do
|
quote do
|
||||||
|
|
@ -36,10 +39,10 @@ defmodule MicrowavepropWeb.ConnCase do
|
||||||
end
|
end
|
||||||
|
|
||||||
setup tags do
|
setup tags do
|
||||||
Microwaveprop.DataCase.setup_sandbox(tags)
|
DataCase.setup_sandbox(tags)
|
||||||
Microwaveprop.DataCase.reset_score_files()
|
DataCase.reset_score_files()
|
||||||
Microwaveprop.Weather.GridCache.clear()
|
GridCache.clear()
|
||||||
Microwaveprop.Propagation.ScoreCache.clear()
|
ScoreCache.clear()
|
||||||
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
{:ok, conn: Phoenix.ConnTest.build_conn()}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue