From 787cb22667639a3bd629e717d448d2614b9cc7f8 Mon Sep 17 00:00:00 2001 From: Koleh David Date: Thu, 6 Feb 2025 14:48:05 +1030 Subject: [PATCH] t increase coverage --- GildedRoseTest.test_foo.approved.txt | 3 +++ README.md | 6 ++++-- test_gilded_rose.py | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/GildedRoseTest.test_foo.approved.txt b/GildedRoseTest.test_foo.approved.txt index 86c49f66..10cd987b 100644 --- a/GildedRoseTest.test_foo.approved.txt +++ b/GildedRoseTest.test_foo.approved.txt @@ -7,3 +7,6 @@ args: ('Aged Brie', 1) => 'Aged Brie, -1, 3' args: ('Backstage passes to a TAFKAL80ETC concert', -1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' args: ('Backstage passes to a TAFKAL80ETC concert', 0) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' args: ('Backstage passes to a TAFKAL80ETC concert', 1) => 'Backstage passes to a TAFKAL80ETC concert, -1, 0' +args: ('Sulfuras, Hand of Ragnaros', -1) => 'Sulfuras, Hand of Ragnaros, 0, -1' +args: ('Sulfuras, Hand of Ragnaros', 0) => 'Sulfuras, Hand of Ragnaros, 0, 0' +args: ('Sulfuras, Hand of Ragnaros', 1) => 'Sulfuras, Hand of Ragnaros, 0, 1' diff --git a/README.md b/README.md index 6fb3f496..6bcbaf05 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,13 @@ pip install -r requirements.txt # Running the tests -This project uses approval tests to ensure the behavior of the code remains the same during refactoring +This project uses [characterisation tests](TODO: Link to characterisation/approval tests concept) to ensure the behavior of the code remains the same during refactoring. ```bash -coverage run --branch -m pytest --approvaltests-add-reporter=diffuse -s ; coverage html ; coverage report --fail-under=100 +coverage run --branch -m pytest --approvaltests-add-reporter=diffuse -s ; +coverage html ; +coverage report --fail-under=100 ``` This will run the tests, and will also: diff --git a/test_gilded_rose.py b/test_gilded_rose.py index b4577e59..190ac6df 100644 --- a/test_gilded_rose.py +++ b/test_gilded_rose.py @@ -16,6 +16,7 @@ class GildedRoseTest(unittest.TestCase): "foo", "Aged Brie", "Backstage passes to a TAFKAL80ETC concert", + "Sulfuras, Hand of Ragnaros", ] verify_all_combinations(self.do_stuff, [input_names, [-1, 0, 1]])