mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
Add brief comments to improve readability
This commit is contained in:
parent
2226342455
commit
002fa9387b
@ -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:
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user