From 89c3754f1999fc6135e5e0eb23c6db8490c2c448 Mon Sep 17 00:00:00 2001 From: Koleh David Date: Thu, 6 Feb 2025 14:54:12 +1030 Subject: [PATCH] t swap input order --- ...dRoseTest.test_update_quality.approved.txt | 40 +++++++++---------- test_gilded_rose.py | 4 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/GildedRoseTest.test_update_quality.approved.txt b/GildedRoseTest.test_update_quality.approved.txt index a71762d5..c7bb94d4 100644 --- a/GildedRoseTest.test_update_quality.approved.txt +++ b/GildedRoseTest.test_update_quality.approved.txt @@ -1,24 +1,24 @@ -args: ('foo', -1, 0) => 'foo, -1, -1' +args: ('foo', 0, -1) => 'foo, -1, -1' args: ('foo', 0, 0) => 'foo, -1, 0' -args: ('foo', 1, 0) => 'foo, -1, 0' -args: ('foo', 49, 0) => 'foo, -1, 47' -args: ('foo', 50, 0) => 'foo, -1, 48' -args: ('foo', 51, 0) => 'foo, -1, 49' -args: ('Aged Brie', -1, 0) => 'Aged Brie, -1, 1' +args: ('foo', 0, 1) => 'foo, -1, 0' +args: ('foo', 0, 49) => 'foo, -1, 47' +args: ('foo', 0, 50) => 'foo, -1, 48' +args: ('foo', 0, 51) => 'foo, -1, 49' +args: ('Aged Brie', 0, -1) => 'Aged Brie, -1, 1' args: ('Aged Brie', 0, 0) => 'Aged Brie, -1, 2' -args: ('Aged Brie', 1, 0) => 'Aged Brie, -1, 3' -args: ('Aged Brie', 49, 0) => 'Aged Brie, -1, 50' -args: ('Aged Brie', 50, 0) => 'Aged Brie, -1, 50' -args: ('Aged Brie', 51, 0) => 'Aged Brie, -1, 51' -args: ('Backstage passes to a TAFKAL80ETC concert', -1, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Aged Brie', 0, 1) => 'Aged Brie, -1, 3' +args: ('Aged Brie', 0, 49) => 'Aged Brie, -1, 50' +args: ('Aged Brie', 0, 50) => 'Aged Brie, -1, 50' +args: ('Aged Brie', 0, 51) => 'Aged Brie, -1, 51' +args: ('Backstage passes to a TAFKAL80ETC concert', 0, -1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' args: ('Backstage passes to a TAFKAL80ETC concert', 0, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' -args: ('Backstage passes to a TAFKAL80ETC concert', 1, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' -args: ('Backstage passes to a TAFKAL80ETC concert', 49, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' -args: ('Backstage passes to a TAFKAL80ETC concert', 50, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' -args: ('Backstage passes to a TAFKAL80ETC concert', 51, 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' -args: ('Sulfuras, Hand of Ragnaros', -1, 0) => 'Sulfuras, Hand of Ragnaros, 0, -1' +args: ('Backstage passes to a TAFKAL80ETC concert', 0, 1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Backstage passes to a TAFKAL80ETC concert', 0, 49) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Backstage passes to a TAFKAL80ETC concert', 0, 50) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Backstage passes to a TAFKAL80ETC concert', 0, 51) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Sulfuras, Hand of Ragnaros', 0, -1) => 'Sulfuras, Hand of Ragnaros, 0, -1' args: ('Sulfuras, Hand of Ragnaros', 0, 0) => 'Sulfuras, Hand of Ragnaros, 0, 0' -args: ('Sulfuras, Hand of Ragnaros', 1, 0) => 'Sulfuras, Hand of Ragnaros, 0, 1' -args: ('Sulfuras, Hand of Ragnaros', 49, 0) => 'Sulfuras, Hand of Ragnaros, 0, 49' -args: ('Sulfuras, Hand of Ragnaros', 50, 0) => 'Sulfuras, Hand of Ragnaros, 0, 50' -args: ('Sulfuras, Hand of Ragnaros', 51, 0) => 'Sulfuras, Hand of Ragnaros, 0, 51' +args: ('Sulfuras, Hand of Ragnaros', 0, 1) => 'Sulfuras, Hand of Ragnaros, 0, 1' +args: ('Sulfuras, Hand of Ragnaros', 0, 49) => 'Sulfuras, Hand of Ragnaros, 0, 49' +args: ('Sulfuras, Hand of Ragnaros', 0, 50) => 'Sulfuras, Hand of Ragnaros, 0, 50' +args: ('Sulfuras, Hand of Ragnaros', 0, 51) => 'Sulfuras, Hand of Ragnaros, 0, 51' diff --git a/test_gilded_rose.py b/test_gilded_rose.py index 2c16849c..8d997c29 100644 --- a/test_gilded_rose.py +++ b/test_gilded_rose.py @@ -5,7 +5,7 @@ from approvaltests.combination_approvals import verify_all_combinations class GildedRoseTest(unittest.TestCase): - def do_stuff(self, name, quality=0, sell_in=0): + def do_stuff(self, name, sell_in=0, quality=0): item = Item(name, sell_in, quality) gilded_rose = GildedRose([item]) gilded_rose.update_quality() @@ -20,7 +20,7 @@ class GildedRoseTest(unittest.TestCase): ] input_qualities = [-1, 0, 1, 49, 50, 51] - verify_all_combinations(self.do_stuff, [input_names, input_qualities, [0]]) + verify_all_combinations(self.do_stuff, [input_names, [0], input_qualities]) if __name__ == "__main__":