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)