From cbda3376b84caea7e17120673885160adc044580 Mon Sep 17 00:00:00 2001 From: Ross Cutler <46252169+rosscutler@users.noreply.github.com> Date: Wed, 4 Jun 2025 12:41:45 -0700 Subject: [PATCH] Add unit test for outliers_modified_z_score --- pytest.ini | 2 ++ tests/test_result_parser.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pytest.ini create mode 100644 tests/test_result_parser.py diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..5ee6477 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +testpaths = tests diff --git a/tests/test_result_parser.py b/tests/test_result_parser.py new file mode 100644 index 0000000..f135e21 --- /dev/null +++ b/tests/test_result_parser.py @@ -0,0 +1,14 @@ +import sys +import os + +# Ensure that 'src' directory is on sys.path so that we can import from src.result_parser +sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + +from src.result_parser import outliers_modified_z_score + + +def test_outliers_modified_z_score(): + values = [1, 2, 3, 50] + result = outliers_modified_z_score(values) + assert result == [1, 2, 3] +