diff --git a/exercises/all-your-base/all_your_base.py b/exercises/all-your-base/all_your_base.py index e065fb4cb4..d0958b9db2 100644 --- a/exercises/all-your-base/all_your_base.py +++ b/exercises/all-your-base/all_your_base.py @@ -1,2 +1,2 @@ -def rebase(from_base, digits, to_base): +def rebase(input_base, digits, output_base): pass diff --git a/exercises/all-your-base/all_your_base_test.py b/exercises/all-your-base/all_your_base_test.py index a103a4d85b..022d62f73a 100644 --- a/exercises/all-your-base/all_your_base_test.py +++ b/exercises/all-your-base/all_your_base_test.py @@ -3,7 +3,7 @@ from all_your_base import rebase -# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v2.3.0 class AllYourBaseTests(unittest.TestCase): @@ -43,15 +43,15 @@ def test_multiple_zeroes(self): def test_leading_zeros(self): self.assertEqual(rebase(7, [0, 6, 0], 10), [4, 2]) - def test_first_base_is_one(self): + def test_input_base_is_one(self): with self.assertRaisesWithMessage(ValueError): - rebase(1, [], 10) + rebase(1, [0], 10) - def test_first_base_is_zero(self): + def test_input_base_is_zero(self): with self.assertRaisesWithMessage(ValueError): rebase(0, [], 10) - def test_first_base_is_negative(self): + def test_input_base_is_negative(self): with self.assertRaisesWithMessage(ValueError): rebase(-2, [1], 10) @@ -63,15 +63,15 @@ def test_invalid_positive_digit(self): with self.assertRaisesWithMessage(ValueError): rebase(2, [1, 2, 1, 0, 1, 0], 10) - def test_second_base_is_one(self): + def test_output_base_is_one(self): with self.assertRaisesWithMessage(ValueError): rebase(2, [1, 0, 1, 0, 1, 0], 1) - def test_second_base_is_zero(self): + def test_output_base_is_zero(self): with self.assertRaisesWithMessage(ValueError): rebase(10, [7], 0) - def test_second_base_is_negative(self): + def test_output_base_is_negative(self): with self.assertRaisesWithMessage(ValueError): rebase(2, [1], -7)