From da2ca04d8e69d79fbf688458c145a741b693a164 Mon Sep 17 00:00:00 2001 From: Bethany Garcia Date: Sun, 2 Jun 2019 17:58:38 -0700 Subject: [PATCH] roman-numerals: sync expected test results and input data with problem-specifications. --- exercises/roman-numerals/example.py | 8 ++++---- exercises/roman-numerals/roman_numerals.py | 2 +- exercises/roman-numerals/roman_numerals_test.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exercises/roman-numerals/example.py b/exercises/roman-numerals/example.py index 531715baaf..1533dcb38c 100644 --- a/exercises/roman-numerals/example.py +++ b/exercises/roman-numerals/example.py @@ -15,10 +15,10 @@ ) -def numeral(number): - s = '' +def roman(number): + result = '' for arabic, roman in NUMERAL_MAPPINGS: while number >= arabic: - s += roman + result += roman number -= arabic - return s + return result diff --git a/exercises/roman-numerals/roman_numerals.py b/exercises/roman-numerals/roman_numerals.py index a70ac8e293..f52e854e18 100644 --- a/exercises/roman-numerals/roman_numerals.py +++ b/exercises/roman-numerals/roman_numerals.py @@ -1,2 +1,2 @@ -def numeral(number): +def roman(number): pass diff --git a/exercises/roman-numerals/roman_numerals_test.py b/exercises/roman-numerals/roman_numerals_test.py index 7d531a9128..4dc50dd631 100644 --- a/exercises/roman-numerals/roman_numerals_test.py +++ b/exercises/roman-numerals/roman_numerals_test.py @@ -2,9 +2,9 @@ import roman_numerals - # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 + class RomanNumeralsTest(unittest.TestCase): numerals = { 1: 'I', @@ -30,7 +30,7 @@ class RomanNumeralsTest(unittest.TestCase): def test_numerals(self): for arabic, numeral in self.numerals.items(): - self.assertEqual(roman_numerals.numeral(arabic), numeral) + self.assertEqual(roman_numerals.roman(arabic), numeral) if __name__ == '__main__':