Skip to content

Commit

Permalink
Updated tests.toml and regenerated test cases for the Change exercise. (
Browse files Browse the repository at this point in the history
#3656)

New test case added. Retesting needed. See Prob-Specs PR#2385: exercism/problem-specifications#2385
  • Loading branch information
BethanyG authored Mar 5, 2024
1 parent daae57b commit efc33f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions exercises/practice/change/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ description = "possible change without unit coins available"
[9a166411-d35d-4f7f-a007-6724ac266178]
description = "another possible change without unit coins available"

[ce0f80d5-51c3-469d-818c-3e69dbd25f75]
description = "a greedy approach is not optimal"

[bbbcc154-e9e9-4209-a4db-dd6d81ec26bb]
description = "no coins make 0 change"

Expand Down
5 changes: 4 additions & 1 deletion exercises/practice/change/change_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These tests are auto-generated with test data from:
# https://github.com/exercism/problem-specifications/tree/main/exercises/change/canonical-data.json
# File last updated on 2023-07-20
# File last updated on 2024-03-05

import unittest

Expand Down Expand Up @@ -37,6 +37,9 @@ def test_possible_change_without_unit_coins_available(self):
def test_another_possible_change_without_unit_coins_available(self):
self.assertEqual(find_fewest_coins([4, 5], 27), [4, 4, 4, 5, 5, 5])

def test_a_greedy_approach_is_not_optimal(self):
self.assertEqual(find_fewest_coins([1, 10, 11], 20), [10, 10])

def test_no_coins_make_0_change(self):
self.assertEqual(find_fewest_coins([1, 5, 10, 21, 25], 0), [])

Expand Down

0 comments on commit efc33f4

Please sign in to comment.