Skip to content

Commit e5edbb6

Browse files
committed
Get test coverage back to 100% cos we can
1 parent b9a38f4 commit e5edbb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/statistex.ex

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -642,6 +642,8 @@ defmodule Statistex do
642642
Any sample that is `<` as the lower bound and any sample `>` are outliers of
643643
the given `samples`.
644644
645+
List passed needs to be non empty, otherwise an `ArgumentError` is raised.
646+
645647
## Options
646648
* `:percentiles` - you can pass it a map of calculated percentiles (25th and 75th are needed).
647649
If it doesn't include them - it will still be computed.
@@ -667,6 +669,9 @@ defmodule Statistex do
667669
668670
iex> Statistex.outlier_bounds([50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 99, 99, 99])
669671
{31.625, 80.625}
672+
673+
iex> Statistex.outlier_bounds([])
674+
** (ArgumentError) Passed an empty list ([]) to calculate statistics from, please pass a list containing at least one number.
670675
"""
671676
@spec outlier_bounds(samples, keyword) :: {lower :: number, upper :: number}
672677
def outlier_bounds(samples, options \\ [])

0 commit comments

Comments
 (0)