Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions exercises/practice/two-bucket/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ description = "Measure one step using bucket one of size 1 and bucket two of siz
[eb329c63-5540-4735-b30b-97f7f4df0f84]
description = "Measure using bucket one of size 2 and bucket two of size 3 - start with bucket one and end with bucket two"

[58d70152-bf2b-46bb-ad54-be58ebe94c03]
description = "Measure using bucket one much bigger than bucket two"

[9dbe6499-caa5-4a58-b5ce-c988d71b8981]
description = "Measure using bucket one much smaller than bucket two"

[449be72d-b10a-4f4b-a959-ca741e333b72]
description = "Not possible to reach the goal"

Expand Down
8 changes: 7 additions & 1 deletion exercises/practice/two-bucket/two_bucket_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/two-bucket/canonical-data.json
# File last updated on 2023-07-21
# File last updated on 2025-09-23

import unittest

Expand Down Expand Up @@ -40,6 +40,12 @@ def test_measure_using_bucket_one_of_size_2_and_bucket_two_of_size_3_start_with_
):
self.assertEqual(measure(2, 3, 3, "one"), (2, "two", 2))

def test_measure_using_bucket_one_much_bigger_than_bucket_two(self):
self.assertEqual(measure(5, 1, 2, "one"), (6, "one", 1))

def test_measure_using_bucket_one_much_smaller_than_bucket_two(self):
self.assertEqual(measure(3, 15, 9, "one"), (6, "two", 0))

def test_not_possible_to_reach_the_goal(self):
with self.assertRaisesWithMessage(ValueError):
measure(6, 15, 5, "one")
Expand Down
Loading