mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-15 02:25:40 +00:00
Renamed main functions to TexttestFixture to make it clear they're not part of the actual refactoring kata
This commit is contained in:
1 parent
80bd31bea4
commit
32ce66e211
5 files changed
+9
-103
No files matched your search
@@ -1,4 +1,3 @@
|
||||
from __future__ import print_function
|
||||
|
||||
def update_quality(items):
|
||||
for item in items:
|
||||
@@ -40,28 +39,3 @@ class Item:
|
||||
def __repr__(self):
|
||||
return "%s, %s, %s" % (self.name, self.sell_in, self.quality)
|
||||
|
||||
if __name__ == "__main__":
|
||||
print ("OMGHAI!")
|
||||
items = [
|
||||
Item(name="+5 Dexterity Vest", sell_in=10, quality=20),
|
||||
Item(name="Aged Brie", sell_in=2, quality=0),
|
||||
Item(name="Elixir of the Mongoose", sell_in=5, quality=7),
|
||||
Item(name="Sulfuras, Hand of Ragnaros", sell_in=0, quality=80),
|
||||
Item(name="Sulfuras, Hand of Ragnaros", sell_in=-1, quality=80),
|
||||
Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=15, quality=20),
|
||||
Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=49),
|
||||
Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=49),
|
||||
Item(name="Conjured Mana Cake", sell_in=3, quality=6), # <-- :O
|
||||
]
|
||||
|
||||
days = 2
|
||||
import sys
|
||||
if len(sys.argv) > 1:
|
||||
days = int(sys.argv[1]) + 1
|
||||
for day in range(days):
|
||||
print("-------- day %s --------" % day)
|
||||
print("name, sellIn, quality")
|
||||
for item in items:
|
||||
print(item)
|
||||
print("")
|
||||
update_quality(items)
|
||||
Reference in new issue
Block a user