From 4ac64936a53b4f783029368411975cb5a7075cff Mon Sep 17 00:00:00 2001 From: Gudrun Lotze Date: Tue, 27 Aug 2024 17:25:07 +0200 Subject: [PATCH] A test for the most_common_element implementation --- tests/test_inspect.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/test_inspect.py b/tests/test_inspect.py index 33efaaa..1eb60c4 100644 --- a/tests/test_inspect.py +++ b/tests/test_inspect.py @@ -26,7 +26,16 @@ def test_longest_decreasing_streak(): raise AssertionError("This test is missing.") -@pytest.mark.skip(reason="Test is not implemented yet") + def test_most_common_element(): - raise AssertionError("This test is missing.") + ll = [1, 2, 3, 4, 1, 1, 2, 3, 3, 3, 3, 3] + res = lwi.most_common_element(ll) + assert res == 3 + + + + +#@pytest.mark.skip(reason="Test is not implemented yet") +#def test_most_common_element(): +# raise AssertionError("This test is missing.")