From 002fa9387b125d57a2ae827f7eb34770aca9033e Mon Sep 17 00:00:00 2001 From: Jenif D Souza W S <67183607+JenifGentry@users.noreply.github.com> Date: Sun, 14 Dec 2025 19:59:12 +0000 Subject: [PATCH] Add brief comments to improve readability --- python/gilded_rose.py | 4 ++-- python/tests/test_gilded_rose_approvals.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/gilded_rose.py b/python/gilded_rose.py index 092f574c..2f50549b 100755 --- a/python/gilded_rose.py +++ b/python/gilded_rose.py @@ -4,7 +4,7 @@ class GildedRose(object): def __init__(self, items): self.items = items - + # Changed the nested if logic def update_quality(self): for item in self.items: @@ -42,7 +42,7 @@ class GildedRose(object): elif "Conjured" in item.name: # Conjured after expiry = -4 total self._decrease_quality(item) - + self._decrease_quality(item) else: diff --git a/python/tests/test_gilded_rose_approvals.py b/python/tests/test_gilded_rose_approvals.py index 6592efa9..3cac218f 100644 --- a/python/tests/test_gilded_rose_approvals.py +++ b/python/tests/test_gilded_rose_approvals.py @@ -6,6 +6,7 @@ from approvaltests import verify from texttest_fixture import main from gilded_rose import Item, GildedRose +# Handle approval test @pytest.mark.skip(reason="Approval tests disabled on this machine") def test_gilded_rose_approvals(): orig_sysout = sys.stdout @@ -20,6 +21,7 @@ def test_gilded_rose_approvals(): verify(answer) +# Add tests for Conjured items def test_conjured_items_degrade_twice_as_fast(): items = [Item("Conjured Mana Cake", 5, 10)] gilded_rose = GildedRose(items)