From e590e7d02def294167c7355078aa1eb7fb1e65e3 Mon Sep 17 00:00:00 2001 From: SerKin0 <71343548+SerKin0@users.noreply.github.com> Date: Wed, 18 Mar 2026 14:17:11 +0300 Subject: [PATCH] =?UTF-8?q?[1]=20=D0=94=D0=BE=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=B1=D0=B0?= =?UTF-8?q?=D0=B7=D0=BE=D0=B2=D1=8B=D1=85=20=D1=84=D1=83=D0=BD=D0=BA=D1=86?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=B7=D0=B0=D0=B4=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Добавлен тест ll_delete --- skorohodovsa/task_1/test/test_task_1.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/skorohodovsa/task_1/test/test_task_1.py b/skorohodovsa/task_1/test/test_task_1.py index d0cb728..f4780e6 100644 --- a/skorohodovsa/task_1/test/test_task_1.py +++ b/skorohodovsa/task_1/test/test_task_1.py @@ -5,7 +5,7 @@ import copy sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) -from linked_list import create_linked_list, ll_find, ll_insert, ll_list_all +from linked_list import create_linked_list, ll_find, ll_insert, ll_list_all, ll_delete @pytest.fixture @@ -108,7 +108,21 @@ def test_ll_insert_new(linked_list): all_items = ll_list_all(result) assert all_items[-1].get("name") == new_name -def test_ll_delete(linked_list): +def test_ll_delete(linked_list, test_records): assert linked_list is not None - \ No newline at end of file + tests = [ + test_records[0], + test_records[1], + test_records[len(test_records) // 2], + test_records[-2], + test_records[-1], + {"name": "Сергей", "phone": "89290504426"}, + ] + + for test in tests: + test_ll = copy.deepcopy(linked_list) + + result_delete = ll_delete(test_ll, test.get('name')) + + assert ll_find(result_delete, test.get('name')) is None \ No newline at end of file