From 2e6cf1e575746229ead09ccf65a05b23db7069e3 Mon Sep 17 00:00:00 2001 From: Zain-Mahmoud Date: Mon, 3 Aug 2026 23:36:45 +0300 Subject: [PATCH 1/3] add tests --- tests/test_introduction.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/test_introduction.py b/tests/test_introduction.py index 363bf3a..64ffdea 100644 --- a/tests/test_introduction.py +++ b/tests/test_introduction.py @@ -16,7 +16,7 @@ class TestIntroductory: @pytest.fixture def user_list(self): return [ - # add your usernames here + "Zain-Mahmoud" "kurbydoo", ] @@ -33,3 +33,11 @@ def test_kurbydoo(self, user_list): assert len(user_list) == 1 ### Add your tests below, follow the format above + + def test_Zain_Mahmoud(self, user_list): + + sorted_list = sorted(user_list) + assert all(sorted_list[0] <= x for x in user_list), "Check sorted" + + num_list = range(15) + assert all((2*x) % 2 == 0 for x in num_list), "Check even" From c41cb33761bf4bdcae478b79ceee6df291a32d62 Mon Sep 17 00:00:00 2001 From: Zain-Mahmoud Date: Mon, 3 Aug 2026 23:40:28 +0300 Subject: [PATCH 2/3] fix formatting --- tests/test_introduction.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_introduction.py b/tests/test_introduction.py index 64ffdea..6415ab7 100644 --- a/tests/test_introduction.py +++ b/tests/test_introduction.py @@ -16,7 +16,7 @@ class TestIntroductory: @pytest.fixture def user_list(self): return [ - "Zain-Mahmoud" + "Zain-Mahmoud", "kurbydoo", ] @@ -30,7 +30,7 @@ def test_kurbydoo(self, user_list): assert counter == n * (n - 1) // 2, "Check arithmetic sum" - assert len(user_list) == 1 + assert len(user_list) >= 1 ### Add your tests below, follow the format above @@ -40,4 +40,4 @@ def test_Zain_Mahmoud(self, user_list): assert all(sorted_list[0] <= x for x in user_list), "Check sorted" num_list = range(15) - assert all((2*x) % 2 == 0 for x in num_list), "Check even" + assert all((2 * x) % 2 == 0 for x in num_list), "Check even" From 44ba6fafb6c6e29b189b01f5f8056277d26552e2 Mon Sep 17 00:00:00 2001 From: Zain-Mahmoud Date: Mon, 3 Aug 2026 23:52:28 +0300 Subject: [PATCH 3/3] fix user_list length test --- tests/test_introduction.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_introduction.py b/tests/test_introduction.py index 6415ab7..8ccc119 100644 --- a/tests/test_introduction.py +++ b/tests/test_introduction.py @@ -30,7 +30,7 @@ def test_kurbydoo(self, user_list): assert counter == n * (n - 1) // 2, "Check arithmetic sum" - assert len(user_list) >= 1 + assert len(user_list) == 2 ### Add your tests below, follow the format above