mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-05 17:51:51 +00:00
t introduce quality as a combination
This commit is contained in:
parent
2658736f1a
commit
f1e41aa8e8
@ -1,3 +1,3 @@
|
||||
args: ('foo',) => 'foo, -1, 0'
|
||||
args: ('Aged Brie',) => 'Aged Brie, -1, 2'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert',) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
args: ('foo', 0) => 'foo, -1, 0'
|
||||
args: ('Aged Brie', 0) => 'Aged Brie, -1, 2'
|
||||
args: ('Backstage passes to a TAFKAL80ETC concert', 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0'
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import unittest
|
||||
|
||||
from gilded_rose import Item, GildedRose
|
||||
from approvaltests.approvals import verify
|
||||
from approvaltests.combination_approvals import verify_all_combinations
|
||||
|
||||
|
||||
class GildedRoseTest(unittest.TestCase):
|
||||
def do_stuff(self, name):
|
||||
item = Item(name, 0, 0)
|
||||
def do_stuff(self, name, quality=0):
|
||||
item = Item(name, 0, quality)
|
||||
gilded_rose = GildedRose([item])
|
||||
gilded_rose.update_quality()
|
||||
return str(item)
|
||||
@ -19,13 +18,7 @@ class GildedRoseTest(unittest.TestCase):
|
||||
"Backstage passes to a TAFKAL80ETC concert",
|
||||
]
|
||||
|
||||
verify_all_combinations(self.do_stuff, [input_vals])
|
||||
|
||||
# to_approve = []
|
||||
# for item in input_vals:
|
||||
# to_approve.append(self.do_stuff(item))
|
||||
#
|
||||
# verify("\n".join(to_approve))
|
||||
verify_all_combinations(self.do_stuff, [input_vals, [0]])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user