From a7a0451c067f52edabadc1fcf0514fc812177e2f Mon Sep 17 00:00:00 2001 From: Sofiia Horokhova Date: Sun, 5 Jul 2026 17:28:09 +0200 Subject: [PATCH 1/2] Solution --- app/test_split_integer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test_split_integer.py b/app/test_split_integer.py index ef3aa668a..ffc53fad4 100644 --- a/app/test_split_integer.py +++ b/app/test_split_integer.py @@ -2,20 +2,20 @@ def test_sum_of_the_parts_should_be_equal_to_value() -> None: - pass + assert sum(split_integer(8, 1)) == 8 def test_should_split_into_equal_parts_when_value_divisible_by_parts() -> None: - pass + assert split_integer(6, 2) == [3, 3] def test_should_return_part_equals_to_value_when_split_into_one_part() -> None: - pass + assert split_integer(10, 1) == [10] def test_parts_should_be_sorted_when_they_are_not_equal() -> None: - pass + assert split_integer(32, 6) == sorted(split_integer(32, 6)) def test_should_add_zeros_when_value_is_less_than_number_of_parts() -> None: - pass + assert split_integer(3, 5) == [0, 0, 1, 1, 1] From 917b9daa726c04103c7ad5322940a2dc8a405c95 Mon Sep 17 00:00:00 2001 From: Sofiia Horokhova Date: Sun, 5 Jul 2026 18:19:48 +0200 Subject: [PATCH 2/2] Add tests for split_integer --- app/test_split_integer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test_split_integer.py b/app/test_split_integer.py index ffc53fad4..64529a5b5 100644 --- a/app/test_split_integer.py +++ b/app/test_split_integer.py @@ -2,7 +2,7 @@ def test_sum_of_the_parts_should_be_equal_to_value() -> None: - assert sum(split_integer(8, 1)) == 8 + assert split_integer(8, 1) == [8] def test_should_split_into_equal_parts_when_value_divisible_by_parts() -> None: @@ -10,11 +10,11 @@ def test_should_split_into_equal_parts_when_value_divisible_by_parts() -> None: def test_should_return_part_equals_to_value_when_split_into_one_part() -> None: - assert split_integer(10, 1) == [10] + assert split_integer(17, 4) == [4, 4, 4, 5] def test_parts_should_be_sorted_when_they_are_not_equal() -> None: - assert split_integer(32, 6) == sorted(split_integer(32, 6)) + assert split_integer(32, 6) == [5, 5, 5, 5, 6, 6] def test_should_add_zeros_when_value_is_less_than_number_of_parts() -> None: