t introduce quality as a combination

This commit is contained in:
Koleh David 2025-02-06 14:28:20 +10:30
parent 2658736f1a
commit f1e41aa8e8
2 changed files with 6 additions and 13 deletions

View File

@ -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'

View File

@ -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__":