texttest_fixture.py 1.2 KB

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. from __future__ import print_function
  3. from gilded_rose import *
  4. if __name__ == "__main__":
  5. print ("OMGHAI!")
  6. items = [
  7. Item(name="+5 Dexterity Vest", sell_in=10, quality=20),
  8. Item(name="Aged Brie", sell_in=2, quality=0),
  9. Item(name="Elixir of the Mongoose", sell_in=5, quality=7),
  10. Item(name="Sulfuras, Hand of Ragnaros", sell_in=0, quality=80),
  11. Item(name="Sulfuras, Hand of Ragnaros", sell_in=-1, quality=80),
  12. Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=15, quality=20),
  13. Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=10, quality=49),
  14. Item(name="Backstage passes to a TAFKAL80ETC concert", sell_in=5, quality=49),
  15. Item(name="Conjured Mana Cake", sell_in=3, quality=6), # <-- :O
  16. ]
  17. days = 2
  18. import sys
  19. if len(sys.argv) > 1:
  20. days = int(sys.argv[1]) + 1
  21. for day in range(days):
  22. print("-------- day %s --------" % day)
  23. print("name, sellIn, quality")
  24. for item in items:
  25. print(item)
  26. print("")
  27. GildedRose(items).update_quality()